- Local time
- Today, 17:48
- Joined
- Feb 19, 2002
- Messages
- 47,015
@DampFloor, If this is a class where you are supposed to be learning about database design, you absolutely have to fix the design before submitting your project. If you are simply supposed to be learning how to work with Access in order to create forms and reports and the GUI elements are more important than the underlying schema, then you can probably keep going. Just know that your interface will be clunky compared to what it otherwise would have been.
A simple method to produce lists of fields for picking is to use a multi-select listbox. The technique is advanced for a beginning class but it could get you out of this hole.
There are three options for the RowSource of a combo/listbox.
1. Table/Query
2. Value List
3. Field list from a table or query
Using the third option, you provide a table or query and the listbox will show all the fields in that table or query. You can then allow the user to select multiple fields. Your code would loop through the listbox and construct an SQL String. You can then use the SQL String as a query. This will work fine for any case where you just want to export the query to a .csv or Excel. However, if you want to use the new query as the RecordSource for a form or report we're back in the "it's really hard to get there from here" territory.
If you are trying to select just the set of fields related to a specific vendor, just hard code the selection and make three of everything. Three forms, three reports, three queries and leave it at that. The user selects vendor 1, 2, or 3, and you use the objects for that vendor.
A simple method to produce lists of fields for picking is to use a multi-select listbox. The technique is advanced for a beginning class but it could get you out of this hole.
There are three options for the RowSource of a combo/listbox.
1. Table/Query
2. Value List
3. Field list from a table or query
Using the third option, you provide a table or query and the listbox will show all the fields in that table or query. You can then allow the user to select multiple fields. Your code would loop through the listbox and construct an SQL String. You can then use the SQL String as a query. This will work fine for any case where you just want to export the query to a .csv or Excel. However, if you want to use the new query as the RecordSource for a form or report we're back in the "it's really hard to get there from here" territory.
If you are trying to select just the set of fields related to a specific vendor, just hard code the selection and make three of everything. Three forms, three reports, three queries and leave it at that. The user selects vendor 1, 2, or 3, and you use the objects for that vendor.