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?
Asked
Active
Viewed 322 times
0
braX
- 10,905
- 5
- 18
- 32
Marife C.A.
- 1
- 1
-
Hi everyone, I have solved this by putting single and double quotes. :) thank you everyone! – Marife C.A. Apr 15 '19 at 01:13
1 Answers
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
- 48,886
- 6
- 31
- 51
-
`DoCmd.RunSQL` doesn't take parameters from `DoCmd.SetParameter`.`DoCmd.OpenQuery` does though. – Erik A Apr 13 '19 at 08:49
-