gstreichan
Registered User.
- Local time
- Today, 04:22
- Joined
- Apr 1, 2014
- Messages
- 34
Dear Experts,
I have a form sourced on a table with general data:
Autonumber (Request_Nr)
Requestor Name
Urgency
Submitted_Date
And a subform with
Request Nr (child field to Form Autonumber)
Material_Description
Mtl_Code
The requestor is supposed to fill out the header first and then populate the subform with details of material descriptions. However, several times the requestor is filling out the details prior to creating the header then the form Request Nr is still as "(new)". Then when requestor enters details in subform, the table subform is sourced on, doesn't get any number because the autonumber was not created yet. The requestor goes then to the header, fills out and data entered in subform "disappears" of course. I am looking for a way not to subform.enable=False if Form.Request_Nr has not yet been generated or equal "(new)". I don't know where to enter this event or code to do it. Basically, I want the subform not to be editable if there is no number in form Request_Nr field, if the header hasn't been filled out yet.
In what event I should write it, in form or subform, and what vba code for that?
I have a form sourced on a table with general data:
Autonumber (Request_Nr)
Requestor Name
Urgency
Submitted_Date
And a subform with
Request Nr (child field to Form Autonumber)
Material_Description
Mtl_Code
The requestor is supposed to fill out the header first and then populate the subform with details of material descriptions. However, several times the requestor is filling out the details prior to creating the header then the form Request Nr is still as "(new)". Then when requestor enters details in subform, the table subform is sourced on, doesn't get any number because the autonumber was not created yet. The requestor goes then to the header, fills out and data entered in subform "disappears" of course. I am looking for a way not to subform.enable=False if Form.Request_Nr has not yet been generated or equal "(new)". I don't know where to enter this event or code to do it. Basically, I want the subform not to be editable if there is no number in form Request_Nr field, if the header hasn't been filled out yet.
In what event I should write it, in form or subform, and what vba code for that?