joyaccess1
Registered User.
- Local time
- Yesterday, 22:33
- Joined
- Jan 21, 2008
- Messages
- 32
Hi,
My table has the below columns
code
desc
created
createduser
in the form, i have the below 2 fields
code
desc
i have before insert event as
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.Created = Now()
Me.CreatedUser = fOSUserName()
End Sub
The problem is when i insert a new row using the form i get the message "you must enter a value in table.createduser field". but when i insert a row from sqlview it works, and the strange thing is if i use the form after the insert statment i don't get the error message and it inserts a new row successfully. is there something that i need to do for the form to recognize the "beforeinsert" event ?. and why does it work fine after the insert statement from sql view ?
Thanks for you help
Joy
My table has the below columns
code
desc
created
createduser
in the form, i have the below 2 fields
code
desc
i have before insert event as
Private Sub Form_BeforeInsert(Cancel As Integer)
Me.Created = Now()
Me.CreatedUser = fOSUserName()
End Sub
The problem is when i insert a new row using the form i get the message "you must enter a value in table.createduser field". but when i insert a row from sqlview it works, and the strange thing is if i use the form after the insert statment i don't get the error message and it inserts a new row successfully. is there something that i need to do for the form to recognize the "beforeinsert" event ?. and why does it work fine after the insert statement from sql view ?
Thanks for you help
Joy