Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Unanswered: Add New Record Problem

    I have a main form with customer information including a unique customer number. There is a button that I created through the forms wizard that has the customer detail records which are basically notes. The customer number also appears on that form.

    The problem is when I am on the customer detail form and I want to add a new record or note, the customer number field is blank. I want the customer number field to be copied from the customer record and show up on the notes.

  2. #2
    Join Date
    Oct 2009
    Posts
    340
    if you had used a subform, via the subform wizard method - this would have been established automatically.

    but since you state you are using a button to open another form - then the placement of the crossreferencing field is not automatic. You must add a little bit of vb at an event that will always occur....perhaps in the AfterUpdate event of a text field you know will be entered.... you need code such as:

    me.KeyField=Forms!FirstForm.KeyField

  3. #3
    Join Date
    Nov 2003
    Posts
    300
    Fantastic!

    Actually, I did use the subform wizard to create the command button to the customer detail form, the problem was when I am in the customer detail form and click on the ADD button, the new note does not have the customer ID from the customer information form..

    But this did the job!-- Thanks!

  4. #4
    Join Date
    Oct 2009
    Posts
    340
    no you didn't/couldn't use the "subform" wizard to make a command button..... it only makes subforms....

    you used a wizard....i.e. embedded feature; of the command button feature....

    sorry to quibble but....glad it is now working; but for the sake of other newbies - when one makes a standard subform - the wizard prompts for the cross referencing field - and so that field gets auto populated when one adds records to that subform....

    when you use a 'wizard' such as a command button to open another form - it isn't a subform and there is no prompt for any cross referencing....so you the designer must establish a cross reference if there is suppose to be one....

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •