noel0589
Electrical
- Sep 23, 2004
- 50
Hi all, I created a command which runs an update query and an append query. Each query requires that the user enter an input. The input is the same for each query, but because it is two different queries, access prompts to enter the same number twice. Could someone show how to code so that i only have to enter once?
Private sub command29_click()
docmd.runsql "update table set field = [ENTER] where isnull(field)"
docmd.runsql "update table1 set field1=[ ]![ ]![ ]
where (([table1].[field2]=[ENTER]))
end sub
I am new so please help. In this case I want to make it so that [Enter] only has to be entered once.
Is there a way to prompt for a variable before running the SQL and then setting [Enter] to be equal to that variable!?!?!
Thanks for any response!!
Private sub command29_click()
docmd.runsql "update table set field = [ENTER] where isnull(field)"
docmd.runsql "update table1 set field1=[ ]![ ]![ ]
where (([table1].[field2]=[ENTER]))
end sub
I am new so please help. In this case I want to make it so that [Enter] only has to be entered once.
Is there a way to prompt for a variable before running the SQL and then setting [Enter] to be equal to that variable!?!?!
Thanks for any response!!