Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing table data from form bound to a query 1

Status
Not open for further replies.

catalinaron

Programmer
Mar 16, 2010
3
US
I am just learning to use Access and I have a project to set up an Access database to tracking equipment in a datacenter. A query of the "model_number" returns many of the necessary fields for the main table (power_requirements, rated_amps, equipment_type, vendor, etc.), but the user inputs equipment-specific information like the serial_number, Equipment_ID, InputPortID, OutputPortID and a few other parameters.

The data then needs to be saved to the master table. The form is bound to the query, so I have been unable to get a simple save button to work. I have tried several different things (e.g. subforms and unbound forms), but have been unable to get all of the data to save to another table.

I don't want to hard code variables in case the customer wants to add parameters, but there must be a way to do this. Thanks for any help that can be provided.
 
How are ya catalinaron . . .

Not enough info to draw out any code yet, but I see [blue]two Update SQL's[/blue] based on the master tables [blue]primarykey[/blue]. The primarykey is [blue]numeric[/blue] (non autonumber) ... and the next number is derived from [blue]DMax(....) + 1[/blue]. With a [blue]primarykey to lock in on[/blue], the update SQL's should be easy.

[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks TheAceMan1 for the response - I'm doing well.

The primary key for the main table (tbl_MasterData) is non-numeric (the only unique value is an Equipment_ID [alphanumeric] right now, but I could change that, I guess).

It is difficult for me to see how DMax could help in this situation, but maybe I am missing something. Let me know what add'l info is needed and I will try to provide it.

The gist of what I am trying to do is query tbl_Model for several default values based on the Model selected, then add several new fields and then save the record to another table tbl_MasterData.

- catalinaron

 
Thanks for the help. I finally have found a way around my problems.

Hope you have a good one, TheAceMan1.

CatalinaRon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top