testo
testo

Reputation: 1260

Dynamic sql-statement in Ms Access

say there is a list. I want to inject values from the selected record to an sql-statement. Actually I do that with vba:

  1. trigger the update-event for the listbox
  2. generate the sql-string (with vba)
  3. send the sql-string to the control

Question: Is it possible to do with the visual editor only?

Upvotes: 0

Views: 197

Answers (1)

Erik A
Erik A

Reputation: 32642

You can refer to form controls in SQL statements using the Forms!FormName!ControlName syntax.

This should allow you to construct the SQL string without needing VBA, but you do need to manually requery to see the change. That can either be achieved with embedded macros or VBA.

Upvotes: 3

Related Questions