?
Solved

adding a pre 6-digit number to field -so users don't have to key in over and over

Posted on 2011-04-30
9
Medium Priority
?
366 Views
Last Modified: 2012-06-21
hello i have attached example
a form attached to table- (3) fields serial number/code number/ key number
users only have to enter code number ( other fields are already populated)
question- if i can explain-
the code numbers always start with (example) 100005 or 100006 or 100015, etc...
is there a way to have the 6-digit prenumber be added in every field automatically so user only has to enter last 6 digits which are always unique-
and then if after user enters 50 numbers and wants to change pre-digit number - is that possible.
thank you
real number is like this 100005abd456 or 100005789ad5-
data10.accdb
0
Comment
Question by:davetough
  • 4
  • 3
  • 2
9 Comments
 
LVL 31

Expert Comment

by:hnasr
ID: 35497184
Try modifying design, add a prenumber field to table.
Set it's default value. When changed in afterupdate modify to  new default value.
Check sample database.

data10-2.accdb
0
 
LVL 31

Expert Comment

by:hnasr
ID: 35497264
The completer code can be used in a query. pre_number & codeNumber
0
 

Author Comment

by:davetough
ID: 35497567
so it does not matter if a table is created with serial number and key code and not pre_number and codenumber and I can use this?( i should say prenumber and code number empty-)

- what happens is users use different form to enter the serial number and key code- and in last stage of certificate program they input codenumber.
thank you
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 31

Accepted Solution

by:
hnasr earned 1600 total points
ID: 35497938
For new entries, prenumber is added by default. For the first entry, remove the 999999, and the default will be blank.
Finish entries as you suggested. At a later stage, enter a valu in prenumber unbound field, and once you add code, pre_number is updated.
Try the sample database.



data10-3.accdb
0
 
LVL 44

Assisted Solution

by:GRayL
GRayL earned 400 total points
ID: 35498179
I would make the first prenumber (the seed if you will) the Tag property of the textbox txtPreNo holding the CodeNumber field
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35498180
Sorry that was just a partial post - more to follow.
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35498185
Is the rule that the prenumber must increase by 1 for every 50 uses?
0
 
LVL 44

Expert Comment

by:GRayL
ID: 35498190
Is the rule -> Is it the rule....
0
 

Author Comment

by:davetough
ID: 35498541
no number 50 is not a rule- coulb < or > - thank you- not sure If that make this solution different if had a definite number?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question