Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Selection Problem

Status
Not open for further replies.

Ludington

Programmer
Oct 1, 2007
16
US
My access program has the following 3 tabs:
1. Client
2. Data
3. Payments

After I enter all the data in the data tab then go to the payment tab the data I just entered is not there.

The payment tab contains the same information as the data tab plus payment information.

If I go back to the client tab and select a new client then go back and select the old client again the payment tab is updated correctly.

I tried doing a refresh and a requery when the payment tab is selected but that didn't work.

Any suggestions?

 
I think you just need to force a save of the record on the data tab. BTW, the "tabs" don't have any relevance to this issue. I assume you might have subforms that are bound to different tables.

Duane
Hook'D on Access
MS Access MVP
 
I tried to force save the record but still having the same problem. I receive an error message saying the current record in not available.

What I get now on the payment subform is what the data subform looks like before any updates take place.

What I need is to have payment subform updated with the data created from the data subform after updates.

Where would you place a force save in the data subform?

Any more suggestions?
 
My main form consist of veteran client information. (Tab 1)

The veteran data subform contains the detailed information pertaining to training and support services needed. (Tab 2)

Link Child Field = vClientID
Link Master Field = vClientID

The veteran payment subform contains the all the data subform information plus payment information. The data subform information is in view only status. (Tab 3)

Link Child Field = vVeteran
Link Master Field = txtVeteranID (this is a text field in on the client form use to lock in the same vendor and payment record - which works great)

What I want is when I click on the Payment tab that all the information I just enterred on the data subform be included on the payment subform.

Thanks again for your help...Ludington
 
Subforms will not automatically display updated information. Changing records in the main form (or closing and re-opening) should update the subform information. You can also force an update by requerying the subform. The code for requerying might look like:
Code:
  Me.sfrmPayments.Requery
You could use a command button to run this code or possibly use the After Update event of the main form.


Duane
Hook'D on Access
MS Access MVP
 
Thanks Dhookom,

I had to put the requery code on the main form tab. Thus when the user clicks the client tab the requery code is executed. It works but is a little trouble some for the user.

I tried putting the requery code a command button on the payment form but that didn't work.

I also tried the update event on the main menu but that didn't work.

Thanks again...Ludington



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top