Noreene Patrick
Registered User.
- Local time
- Today, 14:45
- Joined
- Jul 18, 2002
- Messages
- 223
I am trying to use dlookup to fill an unbound textbox on my form. I know I am doing a simple thing wrong and I cant figure out what it is.
My form has a field from table(m5Warehouse) called M5Location. It is a bin location. My form has an unbound textbox called BinMax.
I have a table called tblbinmax that has 2 columns. Binnumber(same as m5location) and binmax(maxinum number of pallets that can be placed in bin)
When i fill in M5location on my form, I wanted code to fire on afterupdate to look in tblbinmax, look at the binnumber and put in the value in unbound textbox called BinMax.
This is my code: me.binmax.Value = DLookup("[binmax]", "tblbinmax", "[binnumber] =" & Me.M5Location)
I have tried every way i can figure to make this work, and i keep getting error message, name?#, etc. I get error msg 3075 and error msg 2001...PLEASE HELP!!
My form has a field from table(m5Warehouse) called M5Location. It is a bin location. My form has an unbound textbox called BinMax.
I have a table called tblbinmax that has 2 columns. Binnumber(same as m5location) and binmax(maxinum number of pallets that can be placed in bin)
When i fill in M5location on my form, I wanted code to fire on afterupdate to look in tblbinmax, look at the binnumber and put in the value in unbound textbox called BinMax.
This is my code: me.binmax.Value = DLookup("[binmax]", "tblbinmax", "[binnumber] =" & Me.M5Location)
I have tried every way i can figure to make this work, and i keep getting error message, name?#, etc. I get error msg 3075 and error msg 2001...PLEASE HELP!!