Add/Edit Tabbed Form

A

Apprentice

I have multiple input forms in a tabbed main form. I'm trying to give the
user an option to Add New Records - or - Edit existing records based on two
different command buttons.

I have the main form set up properly with Master and Child Fields so that as
you move from one tab to the next the same primary field "Charter_ID" is
referenced and the corresponding records within each table are recognized.

I have also set the "On Current" event of each form to: "setvalue" for the
primary field "Charter_ID" from the main form.

When I have the "Data Entry" set to Yes on all of the forms, everything
works great. When I want the user to open in Edit mode, I will change the
"Data Entry" setting to NO.

So far this works fairly well....... The Form opens and all the records are
shown, and the can be scrolled through using the navigation buttons etc. But
when you move from the main form to the next tab.... the primary field
"Charter_ID", That was on the main form is not displayed in the next forms.
You have to scroll to that record again.

Once the record is found in the main form "1st Tab", the rest of the forms
should also show that record based on the Child/Master relationship of that
field.

Hope I made sense here. Any ideas?
 
A

Allen Browne

Don't assign the Charter_ID in the form's Current event.
Access will do this for you automatically.

When you assign a value to a bound control in Form_Current, you are dirtying
the record. That means Access has to save it again, every time you visit any
record. It's really not something you want to trigger.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top