Tabbed New Record

Ineedcoffee

Registered User.
Local time
Today, 12:58
Joined
Aug 25, 2009
Messages
32
Hi,

I got a problem. I have a form that has multiple tabs (pages) and I need to use this form to create a new record. The only problem is that when you put in the initial information in the first page, as soon as you go to the second page it does not create the ID number (created from page 1) in the table used for page 2.

Each tab has based on a table and all have relationships attached to the General Table (which is page 1).

I know the best way to do this is to create a form that enters only the basic information so it creates a new ID number. I did do this however I added a command on the close button of that form that was to search for the last record created and this did not seem to work. It did not create the new record correctly.

Any help is greatly appreciated.


Thanks,

Ineedcoffee
 
What about data that is already on the respective tables, does it get displayed correctly when you navigate from one record to another?

Depending on your setup, if each page (besides the first page) is based on related tables, then they must must be linked via Master/Child Fields properties of its subform.
 
Existing records all show correctly, they are all linked Master/Child etc.

I have just created a new record and it does put the information in to the General table correctly however if I have a form that searches for the last record, it does not come up with that customer it comes up with the last fully completed one (i.e. the one that has had all of the tables populated from the other tabs).

Thanks.
 
When you perform a search do you requery the other subforms?
 
It appears you are using main form controls on the General tab while the other tabs contain subforms. Subforms only create records (including the link field) on entering a value into a control on the subform.

If you want the record to appear on the other tabs you must have these controls on the main form too.

Alternatively you can use VBA to create a record in each of the subforms when the main form record is created. However unless you have multiple records (related one to many) in the subforms they may as well be bound to the same recordsource as the main form and be part of the main form.
 
VBA, yes I do.

Galaxiom, I know the subforms would only create a record in the table if there is information added. What I want to do is create the ID number in the table as soon as the General table is created.

So I guess my real problem is can I somehow make it so that when the information has been entered on to the General Subform it then creates the ID in the other Tables too.


Thanks.
 
All fixed now.

Created a query based on fields from all of the tables that could be pre poulated, hid them in a new record form and then when hitting the close button, opens the customer record with the tabs all working.

Thanks both!
 
Sounds like an expensive ordeal but I'm glad you came up with your own solution.

I still haven't gotten a clear picture of what you wanted.
 

Users who are viewing this thread

Back
Top Bottom