Dlookup with variable field names (1 Viewer)

thescottsman

Registered User.
Local time
Today, 00:13
Joined
Sep 18, 2014
Messages
42
Hi All

I hope someone can help and see my error

I have a dlookup criteria that is to add a value into a choice of products depending on when the delivery of the product is going to be.

Me.Text114.Value = DLookup("[Me.Text92.Value]", "tbl_ActuatorMonth", "[ActuatorYear]='" & Me.Text110.Value & "' AND [ActuatorMonth]='" & Me.Text101.Value & "' AND [Me.Text114.Value]='" & Me.Text114.Value & "' ")

The error message that I am getting is as follows:
Run time error 3125
" is not a valid name. Make sure that t does not include invalid characters or punctuation and that it is not too long
 

fvdb

Registered User.
Local time
Today, 01:13
Joined
Aug 24, 2015
Messages
67
Code:
 AND [Me.Text114.Value]='" & Me.Text114.Value & "' "

You saying txt114 is txt114. Think this has to be deleted
 

thescottsman

Registered User.
Local time
Today, 00:13
Joined
Sep 18, 2014
Messages
42
Brilliant thank you - it always something simple
 

Users who are viewing this thread

Top Bottom