Solved change the value in combo box (1 Viewer)

Safari

Member
Local time
Today, 13:58
Joined
Jun 14, 2021
Messages
95
hi all

can any one edit my attached data base :
i want .. when i change the value in combo box named " itemsname " in form " invhead " to anther item name in the same combo box it should also changes in table "StoreTransaction" too and update it .

thanks
 

Attachments

  • test.accdb
    3.9 MB · Views: 243

mike60smart

Registered User.
Local time
Today, 11:58
Joined
Aug 6, 2017
Messages
1,899
Hi
I looked at the relationship between your Main Form - "InvHead" and the related Subform "InvDetail"

InvDetail did not have an Autonumber Primary Key - I added it as "DetailsID"

What has the table "StoreTransaction" got to do with the other 2 tables? How is it related to these tables?
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 07:58
Joined
Feb 19, 2002
Messages
42,970
Just FYI, changing a value in one table should have no impact on the values in a different table. If that were to happen, it would imply that you are storing the same data in multiple places and that is a violation of normal forms. You might want to do some reading on normalization.

Comboboxes are used to choose a value from a list. So, for example. In an order, you would choose the customer from the combo and Access would save the CustomerID, NOT the CustomerName in the Order record.
 

Cotswold

Active member
Local time
Today, 11:58
Joined
Dec 31, 2020
Messages
521
You will need to look up Refresh, Requery, RePaint, RepaintObject and referring to Objects and Variables on a form in the Language Reference.

You need to understand how the syntax works, ie:

[Forms]![FormName].[Form]![VarName]
[Forms]![FormName].Requery
[Forms]![FormName]![VarName]
[Forms]![MainForm]![SubForm].Form!FieldName.Refresh
[Forms]![MainForm]![SubForm].Form.Requery

If you want to update a Table, run an Update Query.

No point in doing it all for you, it won't help in the understanding. I'd advise you to read through the Language Reference. Might be a bit boring but is essential at some stage.
 

Users who are viewing this thread

Top Bottom