Dec 21 2006, 07:29 PM
Hi, I've created a form which consists of two combo boxes on the main form, one which is to enter a package number, the other to enter an activity type. I have linked both of these to what I believe to be an appropriate query. I have also created a subform which I want to consist of a table displaying fields for package number, activity type and then the hours spent on each item for the user to input.
I want to get the subform table to show only the package number and activities which correspond to the package and activity selectd by the comboxes, but I dont know what to link the subform too......
Do I link it to the query? I just cant seem to get it to work.
Dec 21 2006, 07:47 PM
Base the subform on a regular query, not a parameter query. Use the subforms Master/Child links to link to the two combo boxes...
Be sure that your structure is normalized as I am not sure what you have since the PackageNumber and ActivityType appear to be fields in a table and I am not sure if one of these fields is the foreign key to either PackageNumber or ActivityType...
Dec 21 2006, 07:50 PM
thanks for your help mate, ill give it a try.
Dec 21 2006, 07:52 PM
You are welcome and good luck with this... If you have questions just give us a shout....
Dec 21 2006, 08:00 PM
every time i try to create a master or child link it says "Can't build a link between unbound forms"
Dec 21 2006, 08:02 PM
You have to type in the names of the combo boxes in the MasterField:
Change object names to those of your actual combo boxes....
PS. Be sure you have two objects in the ChildLink as well...
Dec 21 2006, 08:41 PM
what objects would be placed in the childlink field?
Dec 21 2006, 10:57 PM
i think i cracked that part actually. what im getting now is that the user can select the package number, then select the activity and it brings it up the values that are in the database.
trouble is i cant modify this table in the subform. i desperately want to put data into the 'hours' boxes so the user can select how many hours are necessary, but it seems to be read only, i cant add data to these fields.
Dec 22 2006, 09:11 AM
The subform is probably based on a query that is not updateable. Open the query directly and see if you can add data and if you can't, which you probably can't, then that is the problem. You will need to modify your query and you really should take a close, hard look at your structure as the subform should only need to be based on a single table...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here