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

Tab Control - keeping two fields through all pages 1

Status
Not open for further replies.

SylviaD

Technical User
Apr 6, 2006
7
GB
Hi, I have a database that tracks data on patients through a series of tests. Results are held in separate tables - ie: heart rhythms in the Rhythms table, drugs taken in the Medication table etc. The results of tests are entered into a form which uses tab control - 8 pages - the patient's hospital number is carried thought all of these pages - what I would like to be able to do is to also carry the test date through all the pages rather than have to type it in on each page. I'm not sure if I need a date field with the patient details or if I need a separate table with the test date in it and I'm not really sure how I pull both items through together on the form - hope that make sense.

Many thanks
 
Hi

Two possibilities, which are effectively the same thing

1. put the "common" field on the form, not the tab control

2. if for cosmetic reasons you want the control to appear to be on the tab control, create the control without selecting the tab control, it will then she on all tabs, since it is not contained within the tab control page

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Many thanks Ken for your reply. Sorry, I’m not really sure what you mean – could it be something to do with the way I created the form? This was by first creating individual forms then dragging them onto the various pages of a new ‘multi-page’ form.

Basically I have a form to add a new patient, on this form I put all the patient details – name, address, etc, then I click a command button to open the “tests” form which is the one with 8 pages. This shows the patient’s hospital number (GNumber) on all pages of the form – the command code reads:

“Private Sub Command30_Click()
On Error GoTo Err_Command30_Click
DoCmd.RunCommand acCmdSaveRecord

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "DataForm"

stLinkCriteria = "[GNumber]=" & "'" & Me![GNumber] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command30_Click:
Exit Sub

Err_Command30_Click:
MsgBox Err.Description
Resume Exit_Command30_Click

End Sub”

I need something similar to this command that will bring through the test date to all the pages of my form. The only thing I know about “Tab Control” is that I used it in the design of the form and it gave me the option of using several pages in one form rather than several individual forms.
 
Where is the test date saved (ie which table)

What is the relationship between the tables



Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
The tables are related by GNumber – this field appears in every table. When I first built the database I had a date in each of the tables thinking that the tests might be carried out on different dates but I understand that is not the case – all the test are carried out on the same date but each patient can be referred for tests on any number of occasions so I suppose the answer is that the TestDate field can be moved to anywhere – I would appreciate your guidance. Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top