Re: Help needed in adding records



Thanks for helping me find a solution that seems to be working.

I used your requery, but before I did, I made a variable equal to the
customer number assigned to the new customer. I requery, then use
FindRecord to pop back to the appropriate record.

varCustNo = Me.CustomerNumber
Requery
DoCmd.GoToControl "CustomerNumber"
DoCmd.FindRecord varCustNo, , False, , False, acCurrent

May not be elegant, but it seems to work. I'll continue to play with it.

Thanks, Jana!
ron

"Jana" <Bauer.Jana@xxxxxxxxx> wrote in message
news:1145054839.358106.317170@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Ron:

You can add this line to the code of the AfterInsert event of the Form:

Me.Requery

Note: This will take the user back to the first record of the data
set.

HTH,
Jana



.



Relevant Pages

  • Re: Closing Pop Up Form
    ... customer form, and you'll end up back where you were. ... > the requery I am moved to the first record of the orders form. ...
    (microsoft.public.access.formscoding)
  • Re: Closing Pop Up Form
    ... I open the popup form and successfully create the new customer. ... So I requery the main ... >> the requery I am moved to the first record of the orders form. ...
    (microsoft.public.access.formscoding)
  • Re: Disable fields on Submit
    ... Well, yes, a Requery will run the Current event (on the ... first record), but, unless the first record was already the ... As for the Tag property, I would rather use InStr than hard ... prefix to the control names so the ...
    (microsoft.public.access.formscoding)
  • Re: Delete Record from both Main and Subform while maintaining position
    ... the main form) is to requery after the delete, ... blank record) but returns the record to the first record. ... Set rst = Me.RecordsetClone ... Dim varKey As Variant ...
    (microsoft.public.access.formscoding)
  • RE: Name added to input form not appearing in my drop down
    ... This is the one you suggested that I requery. ... Did you simply make the Customer field blank? ... If your subform does not have a Record Selector, ... the close AddCustomers form routine, or better, in the main form's OnActivate ...
    (microsoft.public.access.forms)