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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showing different forms in a tab control

Status
Not open for further replies.

shaunacol

Programmer
Jan 29, 2001
226
GB
I am writing a database for an estate agency. I have a form call Frm_Client which has lots of details about a client and a tab control called tab_ClientDetails. One of the tabs in the control needs to be for appointments or Inspection flights (IF). If a client lives far away they will book an IF and I have to capture things like their flight number, date of flight etc but if they live nearby then all they will need is an appointment in which case I only need to capture the meeting data, time and location.

At the moment I have 2 forms (Frm_IF and Frm_appt) and I want to find a way to display the right one dependent on whether the client has booked an IF or an appointment. In addition, it would be good if the tab either dissapeared if neither is boooked or displayed a message 'none booked'. Details about clients are in Tbl_Client and details about IFs and appts are all in Tbl_IF. There is a field in Tbl_IF called type where I plan to track if it is IF or APPOINTMENT.

I am hoping it is possible to write some code somewhere to say 'if IF then display Frm_If or if APPOINTMENT the display Frm_appt else display none booked.

However, I dont know where to put this or the syntax to right it.

Any help appreciated,
 
And which form will be displayed for creation ?
Anyway you may have a look at the SourceObject property of the SubForm control.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top