In Access how do I define a value looking up a value in a table?
1 réponse
RickJ
When updating one field I want another field to be automatically updated by
looking up a value in a table. I would like to be able to use the normal set
macros if possible as I am not a programmer
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Eric
Hi,
See the DLookUp() function.
In a form: Text0 is a filled TextBox Text2 is a textbox to fill Text2 ControlSource: =DLookUp("TheField","TheTable","Id=" & Text0) if Id is Numeric or =DLookUp("TheField","TheTable","Id='" & Text0 & "'") is not
or Create a macro whith Action DefineValue Item: ControlToDefine (ex: Text2) Expression: DLookUp("TheField","TheTable","Id=" & Forms!Form1!Text0)
with Text0 updated TextBox in the form named Form1 Text2 receive the value of the TheField from the table TheTable
When updating one field I want another field to be automatically updated by looking up a value in a table. I would like to be able to use the normal set macros if possible as I am not a programmer
-- A+ Eric http://users.skynet.be/mpfa/ Archives : http://groups.google.fr/group/microsoft.public.fr.access?hl=fr
Hi,
See the DLookUp() function.
In a form:
Text0 is a filled TextBox
Text2 is a textbox to fill
Text2 ControlSource:
=DLookUp("TheField","TheTable","Id=" & Text0) if Id is Numeric or
=DLookUp("TheField","TheTable","Id='" & Text0 & "'") is not
or
Create a macro whith Action DefineValue
Item: ControlToDefine (ex: Text2)
Expression: DLookUp("TheField","TheTable","Id=" & Forms!Form1!Text0)
with Text0 updated TextBox in the form named Form1
Text2 receive the value of the TheField from the table TheTable
When updating one field I want another field to be automatically updated by
looking up a value in a table. I would like to be able to use the normal set
macros if possible as I am not a programmer
--
A+
Eric
http://users.skynet.be/mpfa/
Archives : http://groups.google.fr/group/microsoft.public.fr.access?hl=fr
In a form: Text0 is a filled TextBox Text2 is a textbox to fill Text2 ControlSource: =DLookUp("TheField","TheTable","Id=" & Text0) if Id is Numeric or =DLookUp("TheField","TheTable","Id='" & Text0 & "'") is not
or Create a macro whith Action DefineValue Item: ControlToDefine (ex: Text2) Expression: DLookUp("TheField","TheTable","Id=" & Forms!Form1!Text0)
with Text0 updated TextBox in the form named Form1 Text2 receive the value of the TheField from the table TheTable
When updating one field I want another field to be automatically updated by looking up a value in a table. I would like to be able to use the normal set macros if possible as I am not a programmer
-- A+ Eric http://users.skynet.be/mpfa/ Archives : http://groups.google.fr/group/microsoft.public.fr.access?hl=fr