The other day I got some great help on this board with a Dlookup problem well I got that to work but now I notice that if the database is closed I get the following message [Run-time error '2950' Reserved Error] when the code hits here.
TextBox1.Value = Access.Application.DLookup("TText"...
Got it to work this was the code that did it
TextBox1.Value = Access.Application.DLookup("TText", "Template", "TID='" & ComboBox1.Value & " '")
thanks for pointing me in the right direction.
Ok i got the refernce doing it this way?
TextBox1.Value = Access.Application.DLookup("TText", "Template", "TText='" & ComboBox1.Value & " '")
but now I get a Run-time error '2950':
reserved error
Yes under Tool--> References Microsoft Access 12.0 object library is checked but when I do trxtbox1.value = application. --> the drop down box does not show dlookup.
sorry for my ignorance in this matter.
Thanks for all your help.
I have a Combobox called ComboBox1 it gets populated by doing a loop in a access database untill it has filled up. I want to be able to use the selected item in that combobox to populate a textbox from the same database. I have tried the DLookup in VBA but I can seem to get it to work here is...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.