Reputation: 89
good morning, I'm breaking it up with a simple thing
I have a form access that contains a combobox called cboHora and I want to simply update my table (tbEntry) with the value selected in the combobox
Call my query with vba : DoCmd.OpenQuery "Consulta1"
But even fill in the combobox before running the query, the following error appears:
My latest attempt
Can you help me?
Upvotes: 0
Views: 2446
Reputation: 1626
You can't use Me. to reference a form object in a query, you have to use the
[forms]![YourFromName]![YourControlName]
syntax. The expression builder will get you there if you examine the objects. The form must be open in normal view (not design view) when the query is run.
Upvotes: 1