Question Help Needed - Cannot display contents of subforms

mgaccessforfun

New member
Local time
Today, 13:41
Joined
Apr 20, 2012
Messages
5
Hi all, your help is needed ?????

Being new to Access I am am finding my feet slowly but learning loads too !!

I have however come to a bit of a brick wall and cant move on with the development of my project untill this is resolved.

What I have so far;
I have a main employee table and a one-to-many relationship to an emplyee medicals table as a sub-form this seams to work well, I can update the medicals records for all employees which are being saved correctly (i assume as have checked the table and all entries apear to be there) etc.

The Problem;
When I go back to any record none of the data input into the medicals sub-form is displayed (I have checked the medicals table and all entries made are apear to be there), I would like this information to be displayed, I am fairly sure it's only a matter of selecting a switch somewhere but I am buggered if I can find it !!!

All help much appreciated

Martin
 
Please post a jpg of your tables and relationships.

Getting your table structures designed properly is key.
 
Thank you for the help
 

Attachments

  • relationships.JPG
    relationships.JPG
    93.9 KB · Views: 123
looks to me like youve joined a date field with and employee number, which shouldnt be possible, additionally the join looks non descript, should be one to many with person being on the one side

confused.com
 
rodmc

yes i had indeed joined an employee no (primary field) with a date column, I have subsiquently changed this to one of the text fields but without improvement the relationship was (and still is) one to many.

One thing I have notice is that as i scroll through the main employee records on the form the sub-form medical date increases one day at a time starting at 03/01/1900 for each record or if I change this to a text field starting at 3 ?

Martin
 
Hello Martin,

What you need to do is to remove that relationship first. Then create an EmployeeID field in the emplyee medicals table. The new field should be of the same datatype with Employee No field of the Employee details table.
Now you can have your one-to-many relationship between Employee No field of the Employee details table and the Employee ID field of the Emplyee Medicals table.

See if that works.
 
AliyuKatsina

Thank you for that, had to insert a Employee No field as well into the Employee Details table as the original is a primary field and it didn't like being linked in that way, but works great now !!

Now on to working out how to build customised reports, oh joy !!!

Regards

Martin
 

Users who are viewing this thread

Back
Top Bottom