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!

Not Returning Records

Status
Not open for further replies.

Smeg77

Technical User
Oct 7, 2009
18
GB
I'm having a complete mental block on why this isn't working.

I have two lookup tabs, in that they will be deisnged soley for looking up information and not changing.

I have managed to get it so that the Worker.ID is linked to the Equipment.ID (as they are the same) the only problem I now have is when I do a seatch on a person, all the information is displayed correclty in the Person Tab but when I go into the Equipment one, it is trying to overwrite the first record of the table, rather than finding the corresponding record to the Equipment.ID, and I really can't work out why.

This is the code to link the two:

Code:
If Me!TabCtl0 = 4 Then
        Subfrm_Lap_lookup!Laptop_ID = Form_Subfrm_Worker_Details_Lookup![tblWorkers.ID]
End If
 
This is very confusing. Can we assume you have a couple subforms that display records based on something in the main form? Is the something in the main form bound? Does the main form have a Record Source?

Your code does look like you are setting the value of the Laptop_ID field based on the value in another control or field in a subform.

Duane
Hook'D on Access
MS Access MVP
 
I have a Main form I've called MainMenu, and then Stuck a TabCtl in it.

So basically I have one form which currently has about 6 tabs, form which I was going to do everthing. Most things I now have working, so I've got a nice login tab, and 2x Data Entry tabs, where the Worker.ID is linked to the Equipment.ID so if I did a query on the two tables I could find out who has what.

The next stage was to do two Read only Tabs, so that those who can't modify data can still look it up, I've got the Workers-Lookup tab working fine, brings back results, but I then want the Equipment-Lookup table to bring back the Equipment that is recorded against each worker.

The Problem I have atm is, that although I can get it to display the Worker.ID it's not showing the corresponding record, with the equipment details for that worker.

I originally thought this would be the easiest way to create this small DB, but have now worked out I had the wrong brain in when I came up with this Idea.

I'm now so close to finishing this I don't want to go back to the drawing board, and just make everything pop up forms with buttons. As this looks so much nicer.

I can post the mdb if it's of any use, as it contains no private information and just my ramblings and keyboard mashings.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top