VB Code

seanog2001

Registered User.
Local time
Today, 19:30
Joined
Jun 26, 2006
Messages
67
does anyone know the piece of code you need to makea value equal to a value in a text box of a form

eg

if value = "value in textbox" then

xxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxx

End if

im sure its something simple like &txtbox1& just cant get it to work
 
Typically if it is related to the form;
IF Me.TextboxName = "Literal Value" THEN

how ever if it is a piece of code that does not know the form, then it would be;
IF Forms!YourFormName!TextBoxName = "Literal Value" THEN
 
FoFa said:
Typically if it is related to the form;
IF Me.TextboxName = "Literal Value" THEN

how ever if it is a piece of code that does not know the form, then it would be;
IF Forms!YourFormName!TextBoxName = "Literal Value" THEN

thing about that is thereis no literal value the user must chose a name to put into the text box so how do i solve this the name will refer to a name stored in a table
 
if me.txtBox = DLookup("Field", "Table", "Criteria) then...
 

Users who are viewing this thread

Back
Top Bottom