Re: Set value of key field in next form

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Sheila,
usually, the On Open event doesn't work for this, but the Load event does.
Put your macro on the form's Load event and try it.


Jeanette Cunningham -- Melbourne Victoria Australia

"Sheila D" <SheilaD@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C9491A83-EA56-4EF6-BAD9-029B183F5759@xxxxxxxxxxxxxxxx
I have a form which collects date for different hospital procedures.
Depending on the type of procedure I need different forms to ope which I
have
done using a macro to check the value on the after update property of the
field and then open the relevant form. (I'm not a VB person!)

What I would like to do in the new form is automate the Procedure number
already entered on the first form. I've tried using SetValue action in a
macro on the On Open action for the formto refer back to the first form
field
but get an error saying I can't assign a value to the item.

Any help much appreciated
Sheila


.



Relevant Pages

  • Re: Using a Form to open 2nd form
    ... To use the SetValue action in a macro to blank out the StudentName text box ... I close the second form and it returns back to the first form. ...
    (microsoft.public.access.forms)
  • RE: Prefilling a combo box with data from another form
    ... How do I check if the first form is loaded? ... Dave Hargis, Microsoft Access MVP ... "samaclau" wrote: ... the DMAX function in the macro, ...
    (microsoft.public.access.forms)
  • Re: Add new row in Table + new set of Form Fields
    ... This solution has been working very well for the first form I designed. ... have a second form that I now want to use this macro for however it's not ... My second form the row only has 2 ... You said below to change "Cells(1)" to equate to the cell number in the row ...
    (microsoft.public.word.vba.general)
  • Re: Need help with ActiveDocument
    ... I don't have a central macro that runs all the ... I load the first form. ... and still lose the value of the myDoc variable as I switch between ... entered Set myDoc = ActiveDocument; I tried all kinds of other combinations. ...
    (microsoft.public.word.vba.general)
  • Re: Maximize
    ... there is nothing wrong with using the macro. ... To put the code into the form's Load event, ... >> Private Sub Form_Load ... >>> Linda ...
    (microsoft.public.access.gettingstarted)