autonumber in a continuous form

fredy

Registered User.
Local time
Today, 06:47
Joined
Aug 27, 2010
Messages
19
hello everyone,

i'm having trouble with continuous form.
can somebody help me with this?

i need an auto increment number once the data is completed.

let's say i have 3 fields (txtrec_pos,txtname,txtage) in an unbound continuous form.
after i input the data in txtname and txtage when i press the enter key the txtrec_pos will generate an auto increment number.

i already asked google about it but no luck. so i think some of you guys can give me idea on how to do this.

thanks in advance.
 
As I see it, the problem arises because you are not using a table as a RecordSource which would have an autonumber field present.

This begs the question why> Perhaps if you could answer this question, someone may be able to help. :)
 
As I see it, the problem arises because you are not using a table as a RecordSource which would have an autonumber field present.

This begs the question why> Perhaps if you could answer this question, someone may be able to help. :)

thanks ted,martin

i did not use the table as record source because i want all the data to be inputed will start at 1.

this is the scenario, i have main form called personal_info and a subform called list_hobbies. once i filled out the information on personal_info then it will go to the subform(contains 3 fields txtrec_pos,txtname,txtage), there the user might want to list all of his friends . and every time the user input a data in txtname and txtage an autonumber will be displayed in txtrec_pos that will start at 1 to n. where n is the maximum number the user can input.

for example:

personal_info - list of friends
fredy
1. mike 25
2. jon 26

ted.martin
1. fredy 28
2. lester 29
3. jasper 30


something like that.
by the way, i just wanted to see the position of the inputed data.



again, thank you.
 
Perhaps the attached sample will give you some ideas.

It's not exactly the same scenario as what you have but you should be able to adapt the process to meet your needs.
 

Attachments

Yes John's idea is along the lines of what I was going to suggest, although using a Public Variable that you increment by + 1 would also do the trick.
 

Users who are viewing this thread

Back
Top Bottom