Navigation Form and SubForm

JpSkyPilot

Registered User.
Local time
Today, 06:32
Joined
Feb 23, 2012
Messages
20
Hi:

I am using Access 2010 and put a Navigation form in my program. I have already built a "Vehicle" form with a tab control and four tabs. Each tab has a different form on it as a subform. when the Vehicle form opens, data at the top of the page is entered with one specific vehicle's information. I want the subforms to each display relevant data for the tab for the same vehicle (so... If "Vehicle 20" is selected on the Vehicle form, Tab one = "Issues for Repair"... for that selected vehicle should show the Issues for Repair for Vehicle 20.

I have put a procedure in a basModule that works getting the appropriate data for the subForm. (I have a Global variable for the targetVehicle Number and execute a query for the desired info for that specific vehicle). When I do this without the Navigation form, it works fine.

Without the Navigation form, my syntax is:
[Forms]![Vehicle]![subIssuesRepair].Form.RecordSource = repSQL
[Forms]![Vehicle].[subIssuesRep].Requery

However, when I put the vehicle form on the Navigation form, I am told that the program cannot find the "Vehicle" form. I am using the following syntax to refer to the form.
(The Navigation form is just left named "Navigation form")

I have the SQL (repSQL)

[Forms]![Navigation Form]![Vehicle]![subIssuesRepair].Form.RecordSource = repSQL
[Forms]![Navigation Form]![Vehicle].[subIssuesRep].Requery

I get an error that says that the program cannot find the form "Vehicle".

I am probably not using the right format to address the forms...but have tried several combinations and can't figure it out. any assistance would be appreciated!...thanks in advance
 
thanks anyway...I played with it until I found the answer. thanks
 
Can you share the solution? I'm now playing with this same issue.

Thanks.

Ed
 
Hi:

I was not referring to the windows correctly. I was putting:
[Forms]![Navigation Form]![Vehicle]![subIssuesRepair].Form.RecordSource = repSQL
[Forms]![Navigation Form]![Vehicle].[subIssuesRep].Requery

It should have been:
[Forms]![Navigation Form]![NavigationSubform].Form![subIssuesRep].Form.RecordSource = IssuesSQL
[Forms]![Navigation Form]![NavigationSubform].Form![subIssuesRep].Requery

"Vehicle" was the "NavigationSubform"...when your navigation form is up and the correct form is showing in the window...click on the outer rim (same as when you are looking at the properties of a subform on a regular form)...look at the properties...under the "Selection Type" in the combo box, it says "NavigationSubform" That's how you have to refer to it.

Hoe this helps
 
excellent, thank you..

Though shortly after posting I to found a resolution to this issue.

I simply used the "On Current" event to run my sub routine.

Go figure such simple things. This new navigation while interesting has provided some challenge.

Thanks again for sharing your answer.
 

Users who are viewing this thread

Back
Top Bottom