Newbee needs help with two database prolems

  • Thread starter Mekinnik via AccessMonster.com
  • Start date
M

Mekinnik via AccessMonster.com

I am trying to create an automatic alphanumeric number that is driven by the
user selection from a combobox. When the user selects a name say "Sally"
from the combobox, I want Access to grab the first 2 letters 'SA' and then
add to the end of 'SA' a counter starting with '001' counting up for every
record entered. Then once created I want to store the alphanumeric number
'SA001' for that record in my table named "Hazinventory" in a column named
"MSDS". My goal is to hard code all this into my form.

One other problem I have is taking the text form a field and storing it in my
table. Once again I have my combobox and when the user selects one onf the
names I have a subform which will automatically show which business the name
belongs to on my main form, however the field on the main form will not
update the business name into my table or record....

Any assistance with these two problems would be helpful I've been tring for 3
days to repairs these

Thank You
 
G

Guest

The outline for your prob might be like this:

You have to fire soome code for the combo box event after update:

1. grab the first two letters from the combobox ( there is a function left)
and
store them in a variable
2. with the function DMAX you can look up the highest Number in your
table iventory.
3. once you have established the highest number, you can add 1 to the
number
4. save the new number in your table inventory.


jokobe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top