Help-Ref Table Field in VBA

new_2_prog

Registered User.
Local time
Today, 11:54
Joined
Aug 4, 2008
Messages
58
I had this code previously in VB for a form:
Me.QID = [Forms]![QuoteMultiSelect]![QuoteList].Column(0, 1)
(This is a list box)
This doesn't do for me what I need anymore, I want Me.QID to now look at the 2nd column 1st row of table MultiQuote so I did:
Me.QID = [Tables]![MultiQuote]![QuotID] but I get
Run-time error '2465' can't find the field "|" referred to in your expression
What am I doing wrong? It seems pretty basic and I think I have used this before.
Thanks!
 
To get a value from a table you'd either need to open a recordset or use DLookup.
 
Thanks, I used DLookup:
Me.QID = DLookup("[QuotID]", "MultiQuote")
Worked great!
 

Users who are viewing this thread

Back
Top Bottom