Need a DLOOKUP on Form to save in field on Table (1 Viewer)

KEKeogh

Registered User.
Local time
Today, 06:58
Joined
May 4, 2011
Messages
80
Hi all!

Need some help. I have the below DLOOKUP on a form in it's Control Source property and I need it to update the [Commission Due To] field in the "Invoice Master" Table with that same value.

=DLookUp(" [Client_Contact_Info_Main]![FMCC Rep] ","[Client_Contact_Info_Main]","[Client_Contact_Info_Main]![Company_Name] = [Client] ")


Thanks for any help.

Kathie
 

isladogs

MVP / VIP
Local time
Today, 11:58
Joined
Jan 14, 2017
Messages
18,219
Not quite sure how you are using your DLookup but the syntax was wrong.
Try this

Code:
=DLookUp("[FMCC Rep]","[Client_Contact_Info_Main]","[Company_Name] = '" & [Client] & "'")
 

KEKeogh

Registered User.
Local time
Today, 06:58
Joined
May 4, 2011
Messages
80
Thank you so much.

It still doesn't save to the table field but I can make a query to work with now.

Guess that syntax error was enough that I couldn't even do that.

Kathie
 

isladogs

MVP / VIP
Local time
Today, 11:58
Joined
Jan 14, 2017
Messages
18,219
Either use an update query or set the field value equal to the dlookup on your form.
The dlookup shouldn't be in your forms record source
 

Users who are viewing this thread

Top Bottom