Form Help

AdamQuestion

New Member
Joined
Jan 17, 2006
Messages
46
Hello All,

I am wondering if this is possible, I am having access block :eek: !

I have multiple types of products which have different criteria. Ultimately I would like to be able to have ONE form just for viewing these products. How can I include different criteria into a form so when you are navigating through the form, the right criteria comes up for that product. I do not want to see all the fields for every product, just the fields that pertain to that product, but the fields would change for the next product. Can this be done?

Thank You
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

MyBoo

Board Regular
Joined
Aug 9, 2006
Messages
217
I do this all the time. Two possible options (maybe someone else can add to this)

1. You would need to create a form that contains ALL the fields for ALL the data you want to see on this form.. at any given time. All non-common fields would need to be hidden. When you open the form, you would be passing LinkCriteria to the form and at that time you need to unhide the fields specific to that LinkCriteria. This requires VBA code... not difficult, just time consuming.

2. Create an UNBOUND form... where you create the fields. When you open the form, using VBA again, you have to assign the fields of the record you want to display to the unbound fields, in the order you want them displayed.

I recently did this with a Shipping form. We ship disk drives, servers, cisco devices and each, depending on the vendor, may have different information. I set my form to display specific info based on the vendor of the shipped device.
 

AdamQuestion

New Member
Joined
Jan 17, 2006
Messages
46
I thank you for your help but I am afraid I am not very good with coding. I was hoping there was an easier way by possibly having subforms for each product category and having them triggered to appear with the product. Each product is assigned a category and then when I select through the records that category would trigger the subform matching that category. Can this be done?

Thank You
 

MyBoo

Board Regular
Joined
Aug 9, 2006
Messages
217
Yes, you can create subforms for every product category... not sure this would be very efficient and I personally wouldn't recommend it. What happens when you have 1000 product categories? Sounds like a lot of subforms.

My bet is that your underlying tables are not set up correctly to begin with.

If you use ONE query to feed the subform, all fields in the query will always be available for that subform... you would have to create code that hides each field that is null...(unwanted for the particular product).

Without knowing more about your application, I would say you have no way around coding something to fit your scenario.
 

AdamQuestion

New Member
Joined
Jan 17, 2006
Messages
46

ADVERTISEMENT

I would rather have a query holding all the information contained in the categories. The categories are very much the same with a few exceptions. I would setup a subform in datasheet view of all the information in the query. When you select between records I would like the subform to hide certain columns that are not related to that category or product. I would create a category ID that is chosen at the time of creation. This ID would be what the subform was triggered on to hide certain columns. Is this possible?






I agree, but this is a very small database with less than 4 categories. However, I would like to try something closer to your suggestion. I do need help figuring out how to set this up. Could you please advise me? I appreciate your help.

Thank You
 

MyBoo

Board Regular
Joined
Aug 9, 2006
Messages
217
If your data is NOT business sensitive, zip up your .mdb and send it to - BooIsMyCat@hotmail.com - I'll take a look at what you're trying to and see if I can help you out.
 

AdamQuestion

New Member
Joined
Jan 17, 2006
Messages
46
Well, I can certainly send it to you. However, I am stuck using '97 because of where I work.
 

Watch MrExcel Video

Forum statistics

Threads
1,111,908
Messages
5,541,529
Members
410,547
Latest member
htran4
Top