Compare the text field to table field (1 Viewer)

Gemma Khan

Registered User.
Local time
Today, 13:53
Joined
Jun 29, 2009
Messages
13
Hi,
How to compare the text field to Table fields? :confused:

Thanks
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 06:53
Joined
Jan 20, 2009
Messages
12,856
The text field on the form can be referred to by its name.
From the form's Class Module:

Me!controlname

Use a Domain Lookup for the table field.

Code:
DLookUp("wantedfieldname","tablename","somefield.tablename=Forms!formname.somecontrolname")
 

Max D

Registered User.
Local time
Today, 13:53
Joined
Jul 3, 2009
Messages
91
If you need to compare text field on form to some current record field, you can reach them by their names.

Lets assume you have:

  • Table1 with (ID,Full Name) fields
  • form tied to Table1, but without the textbox bound to Full Name field
  • unbound textbox named Txt
You can write something like this:
Code:
If [COLOR=RoyalBlue]Txt[/COLOR]=[COLOR=RoyalBlue]Full_Name[/COLOR] Then la-la-la...
 

Users who are viewing this thread

Top Bottom