Saving new records to a subform???

RitaMoloney

Registered User.
Local time
Yesterday, 21:16
Joined
May 6, 2004
Messages
50
Hello,
On my form, when adding a new record I select Job Name form a combo box, which creates a new record for the Job Details table.
On the Subform, the Job Details ID creates a new record for the parts used table.
It will allow me to save that record once.
I need to be able to select more than one part used for the same job. i.e. create a new record on my subform while keeping the same Job Details ID number.

I am sure this has to be done through a command button and some vb attached to it. I have no idea how to go about it and would really appreciate it if someone could help. I have attached a picture of my form. If you need more details please let me know.

Thanks in advance,
Rita
 

Attachments

  • form.gif
    form.gif
    10.8 KB · Views: 134
Perhaps I'm missing something, but the navigation buttons on your sub-form should do the job.
 
Saving a Foreign key multiple time to a primary key

joeselch said:
Perhaps I'm missing something, but the navigation buttons on your sub-form should do the job.

Hi,

Thank you for your response. The navigation buttons on the subform will indeed add a new record but the problem is it will not obtain the Job Details ID number on the subform.

This Job Details ID number is a primary key in the JobDetails table and a Foreign Key in the PartsUsed table. In order to match the Job details with parts used I need to retain the same foreign key (Job Details ID) on the subform when select multiple parts.

I hope I have explained this a bit better.

Thanks again for your response,
Rita
 
Sorry - misunderstood.

Your PartsUsed form should be a sub-form on your JobDetails form (not your Job form).
 
Silly me! your right. I got it working.

Thanks again for your response.
 

Users who are viewing this thread

Back
Top Bottom