Return Focus when use command control

W

weschmad

On a Form with a command control that runs a Update Query
How can I supress the DataSheet that appears
& keep or return the focus on the Form
Thanks
 
R

Rick Brandt

weschmad said:
On a Form with a command control that runs a Update Query
How can I supress the DataSheet that appears
& keep or return the focus on the Form
Thanks

What is the code? You should "execute" an update query, not "open" it.
 
O

Ofer

It sound like you running a select query and not an update query(update,
create, delete, append), an update query doesn't return data, datasheet for
that metter.

So run an update query and then return the focus to the field

Docmd.OpenQuery "ActionQueryName"
Me.FieldName.SetFocus
 
Top