0

I have been working on an inventory system using MS Access, everything is going well. I just want to ask if there is a way to execute DoCmd.RunSQL without these prompts/dialog boxes?

braX
  • 11,506
  • 5
  • 20
  • 33

1 Answers1

0

Yes, you can use Replace, after having set YourParameterValue to a value that makes sense:

DoCmd.RunSQL Replace(YourSqlString, "Purchased_4/1/2019", YourParameterValue)

or, if the value is a string:

DoCmd.RunSQL Replace(YourSqlString, "Purchased_4/1/2019", "'" & YourParameterValue & "'")

Though that parameter name seems a bit weird ...

Gustav
  • 53,498
  • 7
  • 29
  • 55