DLookUp in Text Box Control Source (1 Viewer)

tmw4889

New member
Local time
Today, 15:50
Joined
Feb 7, 2014
Messages
3
I currently have a DLookUp formula in a Text Box Control Source. It returns the value I am looking for, however, the value will not add to the record. I have tried putting the DLookUp formula in the Default Property, but it is not working. Any suggestions?

It is a multi-criteria DLookUp, where the criteria is entered into the form.

=DLookUp("[TBA CUSIPs]","[TBA CUSIPs]","[Settlement Month]=" & [Forms]![Enter Trade]![Settlement Month Text Box] & " AND [Coupon]=" & [Forms]![Enter Trade]![Coupon Text Box] & " AND [Instrument] = '" & [Forms]![Enter Trade]![Instrument Combo Box] & "'")

Thanks,
 

Mihail

Registered User.
Local time
Today, 22:50
Joined
Jan 22, 2011
Messages
2,373
Any suggestions
Yes: DO NOT do this.
This is a "calculated" value that should NOT be stored in a table.
 

tmw4889

New member
Local time
Today, 15:50
Joined
Feb 7, 2014
Messages
3
Mihail,

I have tried to enter the Dlookup statement in the row source of a combo box, but having no luck.

How about using a Select Statement in the row source of the combo box?


SELECT [TBA CUSIPs.TBA CUSIPs], FROM [TBA CUSIPs] WHERE (((TBA CUSIPs.Instrument)=forms!Enter Trade!Instrument Combo Box) AND ((TBA CUSIPs.Coupon)=forms!Enter Trade!Coupon Text Box) AND ((TBA CUSIPs.Settlement Month)=forms!Enter Trade!Settlement Month Text Box)))

Sorry, not much of an access user. Really struggling here. Just trying to improve/update a small outdated database.

Thanks,
 

EternalMyrtle

I'm still alive
Local time
Today, 12:50
Joined
May 10, 2013
Messages
533
Yes: DO NOT do this.
This is a "calculated" value that should NOT be stored in a table.

As Mihail stated, calculated fields should not be stored in tables.

You should do this in a query and not try to save the data to a table.
 

Users who are viewing this thread

Top Bottom