Shift-f9 sendkeys in a subform - from a macro

triple6

New member
Local time
Today, 04:11
Joined
Jul 21, 2003
Messages
6
I have developed a form/sub form(s) page with some parent-child master-slave relationships; however have met the 'you cannot do that action here ... ' type message. Have progressed to develop a workaround using the shift-F9 combination in a macro, which works well in Win98 on Access2000 with a sendkeys event called from a macro. Now... had to transfer to work, running Access2000 on XP. Alas still need to manually press Shift-F9 to update the undewrlying table. What might the required code be in XP - do I need to put +{F9} as "+{F9}" or other combinations of letters/numbers - I've tried a few but I think (hope) someone else will have met this before.


Cheers
 
If you want to save the current record, do it the correct way -
DoCmd.RunCommand acCmdSaveRecord

If you want to requery the form's recordsource, do it the correct way -
Me.Requery

You have made a convoluted process in an effort to avoid a single line of VBA code. As it happens, requerying the form saves the current record but why would you want to run the recordsource's query again if all you want to do is save the current record?
 
Pat

Appreciate the comments, however am unsure of the general tenor of the reply.

I'm not sure of the 'correct' ways, perhaps the accepted ways?

It was not an effort to avoid a single line of VB, but perhaps limited experience in this field.

Regards
 
Sorry for the tone :o Did my answer resolve your problem?
 
Yes. Using VB did alleviate the problem, and opened further avenues for (re)learning syntax and gaining assistance from others. Received information from another senior member suggesting some of the problem was with my attempt at update was only updating the main form, not the sub forms. Once placed in VB, setting as forms!mainformname!subformname!forms.requery was able to manipulate things much better.

Once again, thanks for taking the time to respond. Everything's cool.
 

Users who are viewing this thread

Back
Top Bottom