brewpedals
Registered User.
- Local time
- Today, 22:27
- Joined
- Oct 16, 2002
- Messages
- 32
Hi all,
I have a form that I would like to use to edit existing records and create new ones. I have written code for a new record button and I am having trouble passing a value from one form to the other. I get a 2427 "...expression that has no value..." error.
Can you look it over for me please?
Here is the code on the new record button on my main form.
* I use frm_DetectIdleTime to store the current UserID in an unbound form.
* frm_DMSS is the form I want use to create and edit records.
The error occurs on the formopen code when I try to set another variable based upon the value in the target control.
strOwnerID = Me.txt_OwnerID.Value
Thanks so much for your time.
I have a form that I would like to use to edit existing records and create new ones. I have written code for a new record button and I am having trouble passing a value from one form to the other. I get a 2427 "...expression that has no value..." error.
Can you look it over for me please?
Here is the code on the new record button on my main form.
Code:
stDocName = "frm_DMSS"
DoCmd.OpenForm stDocName, , , acFormAdd
Forms!frm_DMSS!Form.Caption = "Create a NEW Document record."
Forms!frm_DMSS!txt_OwnerID = Forms!frm_DetectIdleTime!UserID.Value
Forms!frm_DMSS!Date = Date
* I use frm_DetectIdleTime to store the current UserID in an unbound form.
* frm_DMSS is the form I want use to create and edit records.
The error occurs on the formopen code when I try to set another variable based upon the value in the target control.
strOwnerID = Me.txt_OwnerID.Value
Thanks so much for your time.