accessingaccess
Registered User.
- Local time
- Today, 07:27
- Joined
- Mar 2, 2019
- Messages
- 11
Hello!
I am using Access 2016.
I have a form for client details that includes a Client ID which is an auto-number. Within this form, I have three tabs. On one of these tabs, there is another form where users can add or subtract the amount of store credit a client has. This form has a "tradeID" to differentiate each transaction, a date, the amount, and the "ClientID". TradeID is an auto number, and I need the ClientID to auto populate to match the client who's form we are viewing. When I manually enter the client ID myself there is no issue. But when I have tried to make it pull that information from the page we are on with the expression "=[Forms]![ClientTradesForm]![ClientID]", I get the error "You cannot change or add a record because a related record is required in table 'Client'". My client table does has a field for ClientID, so I don't know why this doesn't work. The correct number does auto populate, it just won't let me save the "trade" when it gets the number this way. Whereas if I manually type the same number in, it's fine.
I need it to auto populate so as to minimize mistakes as this will be used in a fast paced environment.
Any help is much appreciated! Thank you.
I am using Access 2016.
I have a form for client details that includes a Client ID which is an auto-number. Within this form, I have three tabs. On one of these tabs, there is another form where users can add or subtract the amount of store credit a client has. This form has a "tradeID" to differentiate each transaction, a date, the amount, and the "ClientID". TradeID is an auto number, and I need the ClientID to auto populate to match the client who's form we are viewing. When I manually enter the client ID myself there is no issue. But when I have tried to make it pull that information from the page we are on with the expression "=[Forms]![ClientTradesForm]![ClientID]", I get the error "You cannot change or add a record because a related record is required in table 'Client'". My client table does has a field for ClientID, so I don't know why this doesn't work. The correct number does auto populate, it just won't let me save the "trade" when it gets the number this way. Whereas if I manually type the same number in, it's fine.
I need it to auto populate so as to minimize mistakes as this will be used in a fast paced environment.
Any help is much appreciated! Thank you.