Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with DLOOKUP

Status
Not open for further replies.

mpmoore

Technical User
Apr 5, 2001
27
0
0
US
It's me again. Today's dilema concerns looking up data in another table and then acting on it depending on what the information is. This will sound familiar to some as it is based on an earlier question. (thread702-81848)
[DealerName] is a field in the Lease_Table.
[Automotive] is a field in the Dealer_Table.

When the name of a dealer is entered in Lease_Table![Dealername], I need to return the value of Dealer_Table![Automotive] and run an If/Then statement based on value returned. DLOOKUP was suggested as a method to try, however I don't seem to be able to pull it all together.

Can someone point me in the right direction? s-)

Thanks,
Michael
 
Hi!

strSQL="Select * From Dealer_Table Where Dealername = " & Me.MyDealernameUpdateControlInTheForm & ";"

Me.RecordSource= strSQL (main form RecordSource)
or
Me.MySubForm.Form.RecordSource= strSQL (sub form RecordSource)
or
Me.cboMyCombo.RowSource = strSQL (combo box RowSource )
or etc.

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top