Auto input into a field

RustyRick

Registered User.
Local time
Yesterday, 19:24
Joined
Jan 31, 2013
Messages
123
How can I have my form field "Customer_ID" cut and past the first 7 digits from my "ContactID" into itself. i.e. The "ContactID" is "depekakwor". The first 7 digits is the "Customer_ID". Which by the way is already in the Customer tbl.

Access 2010 on Win 7
 
You shouldn't store calculated values. This means Customer_ID shouldn't be a field in your tables, but should be in a SELECT query. To do this you will use the MID function (http://www.techonthenet.com/access/functions/string/mid.php). Then when you need to reference the Customer_ID you look it up using that query.
 
Hmm - my Customer_ID has to relate to 4 tables.
I didn't think this was a "calculation". It's not in a calculation field but a text type.
When one of several hundred contacts phones my dispatcher he identifies himself. We have the "OrderDetail" form open. And need to quickly identify the location where he wants us to deliver something.
So when I identify the phone caller "Contact" and through the ComboBox pick the caller, it immediately populates the Customer field which runs a query to find all his related delivery spots.

The first 7 digits identify the Customer. (depekak)wor
 

Users who are viewing this thread

Back
Top Bottom