Question I have a text field and I want it to match the auto number (1 Viewer)

Grooz13

Registered User.
Local time
Today, 14:16
Joined
May 31, 2010
Messages
14
Hello I'm currently working on a DB and I have a question
I have a field in my Submission table which is an auto number for each submission. the field is called No_Sub_Auto.

What I want is to have another field which is called No_Sub and it needs to be the same value as the No_Sub_auto

like when I open the forms No_Sub_auto gets the next number in the line and No_Sub equals this number, and I want it to be automaticly assign, not the user that would enter the same number. is it possible ?
 

Rabbie

Super Moderator
Local time
Today, 19:16
Joined
Jul 10, 2007
Messages
5,906
Welcome to AWF.

Why can't you just use No_sub_Auto:confused: If We knew why you needed a separate field it would be helpful
 
Last edited:

Grooz13

Registered User.
Local time
Today, 14:16
Joined
May 31, 2010
Messages
14
I want it to be different so when the user will get something new on the same order suppose order 0001, well the First time the No_Sub_auto will be 0001, No_Sub will be 0001 but it gets new info like the client want something different, the order have to go through a different process while beeing the same order so te employee with a button will append it like 0001-S1 and I can't append auto Number, so I want each one to be unique while having a relation between them, that's why. If you have a better idea I'm full open to new things :p

P.S. Sorry for the bad english
 

Brianwarnock

Retired
Local time
Today, 19:16
Joined
Jun 2, 2003
Messages
12,701
not sure which is the correct event to do this but the Form's on current should be ok


Code:
Private Sub Form_Current()
If Me.NewRecord = True Then
Me.No_Sub = Me.No_Sub_auto
End If
End Sub

Brian
 

Galaxiom

Super Moderator
Staff member
Local time
Tomorrow, 04:16
Joined
Jan 20, 2009
Messages
12,852
Anther potential candidate for actions on new records:
Before Insert which occurs when the first value is entered in a new record.
 

Brianwarnock

Retired
Local time
Today, 19:16
Joined
Jun 2, 2003
Messages
12,701
Anther potential candidate for actions on new records:
Before Insert which occurs when the first value is entered in a new record.

I agree, I did say I wasn't sure which was best event, getting out of touch

Brian
 

Users who are viewing this thread

Top Bottom