• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Access question

archcommus

Diamond Member
I have a table with records. I want to query some of those records in a form. This can be done easily with a list box. However, next to that grid, I'd like an input grid, where the user can input more data pertaining to that record (to the right of it, in the new grid), and that data, combined with the queried data from the existing table, would all be saved to a new table. Is this possible?

Thank you!
 
yes it is, but it would require using an INSERT SQL statement in VBA.

1. Have a form that queries data
2. Have unbound fields for new data entry for each record.
3. have a button that will execute a SQL insert statement using the values on the form into the new table.
 
Thanks, KLin. That doesn't sound too hard. So I can just drop SQL code anywhere in the form's code window? What kind of call would I need in the command button?
 
The problem I'm having is getting my queried data to appear as a grid in my form, and then be able to input data in a grid, as well. The only way I see to get the queried data to appear that way is to make the form just a single record tall, and then set the default view to "continuous forms." However, when I do this, any data I input in any unbound field is applied to every record instead of just that one. Any ideas?
 
It looks like you'd have to use bound controls. I don't know enough about forms, so I can't help you much. Sorry.
 
You at least gave me a hint by mentioning bound controls, you're right about that. I need to have a pre-existing table to hold this stuff.

Thanks for your help.
 
Well I figured out a way to do it without using continuous forms, meaning I can use unbound controls again. So how do I go about this step:

3. have a button that will execute a SQL insert statement using the values on the form into the new table.

Thanks.
 
Back
Top