gosamerone Level: Big Cheese Registered: 22-03-2005 Posts: 20
Value of Subform Txtbox
I want to run a procedure based on the value of a textbox on my subform. The textbox will contain either a 1 or 0
Using Access
Formname = F_ShipTicketdata
Subform name = F_Pickticket
Textboxname = txtptcheck
this is where I get the error
If [Forms]![F_Pickticket]![txtptcheck].value = 0 Then
How should this be written?
Thanks
[Edited by gosamerone on 26-10-2006 at 09:03 AM GMT]
26-10-2006 at 02:01 PM
|
stickleprojects Level: Moderator Registered: 09-09-2002 Posts: 891
Re: Value of Subform Txtbox
Hi,
I believe the syntax is
[Forms]!F_PickTicket]![subformnamecontrolname].Form.txtptcheck.value
Hope this helps,
Kieron
____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)
27-10-2006 at 09:55 AM
|
gosamerone Level: Big Cheese Registered: 22-03-2005 Posts: 20
Re: Value of Subform Txtbox
I'm sorry, I have been trying this and I am still doing something wrong. What goes in [subformnamecontrolname] because F_Pickticket does not work.
I have tried variations for the following
If [Forms]![F_ShipTicketdata]![F_Pickticket].Form.txtptcheck.value > 0 Then
I realize [F_Pickticket] is not right but txtptcheck is the txt box on my subform named F_Pickticket that I want to check against.
Sorry again for my confusion.
[Edited by gosamerone on 27-10-2006 at 08:14 AM GMT]
27-10-2006 at 01:13 PM
|
stickleprojects Level: Moderator Registered: 09-09-2002 Posts: 891
You have a master form called something (main_form_name - "f_shipticketdata"), on this form is a subform.
Open the master form in design mode
Right-click on the child form (subform) and view the properties
the property "name" is what you put in subform_control_name
Hope that's clearer
Kieron
____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)
27-10-2006 at 03:04 PM
|
gosamerone Level: Big Cheese Registered: 22-03-2005 Posts: 20
Re: Value of Subform Txtbox
Sad thing was my subform property "name" was F_Pickticket
Followed everything but still had a problem. HOWEVER, I took out the last ".form" and it worked great
If Forms!F_ShipTicketdata!F_Pickticket!txtptcheck.value > 0 Then