Navigation Forms

Acropolis

Registered User.
Local time
Today, 04:10
Joined
Feb 18, 2013
Messages
182
Hi,

I have a form which when open displays various bits of information relating to field works jobs we carry out.

There are various types of jobs we do, and whilst a lot of the infromation is relevant to all jobs, some of it is specific to the job type.

The form is made up of a naviation section, which has different tabs for different bits of information. What I would like to do is have a tab with is titled say "Job Specific" and when clicked on it, the job type dictates which form is displayed as the navigation target name. Then create different forms for each job type, but only the approriate one enters based upon the job type that is been looked at.

Is this possible to do?

Thanks
 
Sounds like you need to use the Tab Control Change Event

For example
Code:
Dim I as Integer
I = Me.TabCtl

If I = Me!TabCtl.Pages("TabName").PageIndex = TRUE then

Do something etc.
 
Put an extra field in the job type table, which holds the name of the form to be shown in the navigation page.

Put in an onload event which looks up the form name and set the navigations tartget page to that name, all works nicely.

Code:
Private Sub Form_Load()
Dim myNavForm As String
myNavForm = Nz(DLookup("[DefaultDetailsForm]", "tblFieldJobType", "[FieldJobTypeID]=" & Me.cboFieldJobTypeId.Value), "frmDefaultForm")
Me.navSpecific.NavigationTargetName = myNavForm
End Sub
 

Users who are viewing this thread

Back
Top Bottom