SendKey????

D

duncanjx

I have tblAgency with frmAgencyDetails for viewing the details. Most
of the fields are locked for editing as people were overwriting
certain fields. I have a link to another form frmAgencyEdit (which is
linked to the specific record) for staff to edit. It has cut down on
errors. Status, is one of the few fields not locked for editing on
frmAgencyDetails.
..
I want to create a new record, add "New Record" to the Status field
and then create an additional record that can be edited. Having Status
with a default value of "New Record" does not work.

Issue: I want to add "New Record" to the Status field. When I have
tried using SendKey it does not work for me.
I may have the syntax wrong. Any suggestions?

So far this creates a new record then moves to the Status field.
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl Status

Duncan
 
K

Ken Snell \(MVP\)

Using SendKeys can be very risky... the focus may not be exactly where you
want it to be when the action occurs. Better to write the value directly
into the control/field.

Did you try this:

DoCmd.GoToRecord , , acNewRec
Me.[Status].Value = "New Record"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top