Combining Information (1 Viewer)

DavidRS

Registered User.
Local time
Today, 10:23
Joined
Jan 4, 2005
Messages
43
I am currently working on a project for our training dept to link staff members to particular peices of equipment. I have created two tables - tblEquipment and tblStaff_Table. I have also created a form based on a query that gets the staff details based on the surname. Within the staff form I have a subform that allows equipment to be linked to staff members. What I am trying to do is when a specific piece of equipment is selected, only those additional bits of data related to the piece of equipment, such as manufaturer or model no. are shown - sort of like an autofilter in Excel.

I have been banging my head against a brick wall with this one. I'm sure that Access can do this but I can't work out how.

Can anybody help?

David :(
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 04:23
Joined
Feb 28, 2001
Messages
27,209
There are a couple of ways to do this but they require some VBA programming if you want to make it fancy.

On the other hand, if the table contains all of the fields all of the time but some just happen to be null, you can surely display the null field on a form. It will come out empty or perhaps will have a slightly different background.

To do it on a form and make the fields dynamic depends on whether you are talking continuous or single form display mode. Continuous forms are notorious for being a bit too tricky. Single forms are better but don't display as much data.

On a single-record form, you can do all sorts of tailoring. If you are not familiar with VBA or some of the terms I use, be prepared to visit your Help files a lot.

If I wanted to disable certain text boxes and hide them based on the type of device in question, I would put some VBA code in the form's OnCurrent event to look at the device type code. Based on that type code, I would visit all of the displayed controls and make them .Enabled=No and .Visible=No if they did not apply to the device type, or Yes when they did apply.
 

DavidRS

Registered User.
Local time
Today, 10:23
Joined
Jan 4, 2005
Messages
43
Thanks for the suggestion.

I am keen to make it somewhat fancy, if only so that the end-users (line managers and such) don't have to do much.

Can you recommend any good books on VBA programming. I have a couple on VB 6.0 which I am just starting to work through but I understand that VBA is slightly different in as much as the Earth is slightly different to Mars!

I am more than prepared to work through books not just for this db but future work that I carry out.

Cheers
 

Users who are viewing this thread

Top Bottom