Can't as it connect to SQL backend DB.
Will keep trying the various combinations to see if I can sort it.
Kindest regards
Edd
Edd,
Can you send me the database? Does it have data in it?
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
http://www.regina-whipp.com/index_files/TipList.htm
I have tried this behind the close form button of frmShipment :
Private Sub CmdClose_Click()
Forms!frmInvoice!txtShipmentID = invoiceID & "-" & shipmentcode
Forms!frmInvoice!frmInvoiceLineItems.Form!frmInvoiceLineItems.Form!ChkSelect.Visible
= True
DoCmd.Close
End Sub
But keep getting the following error
Can't find the field 'frmInvoiceLineItems' referred to in your
expression
So again I appear to be referencing the control wrong
PS have changed the checkbox control to ChkSelect
The on-close event is on a separate form. So I assume what you are
saying is that we add this event to this on-close event to make the
checkbox visible?
My issue also seems on how to construct the target:
Form![frmInvoice]![frmInvoiceLineItems].Form![Check85].Visible = True
Or is it:
Form![frmInvoiceLineItems].Form![Check85].Visible = True
Regards
Edd,
Well, that would explain why it's not working... Think about it, it
sounds like you are telling the form to...
Click cmdClose...
...and right before you close...
...do this Forms!frmInvoice!txtShipmentID = invoiceID & "-" &
shipmentcode...
***PLACE CODE HERE - See paragraph below***
...then Close the form
The After_Update eent of txtShipmentID never has a chance to fire
because the form closed. You would need to place the code where
indicated above in order for it have a chance to fire. Is that
button on the Parent form or the Subform? It may have to be
adjusted accordingly.
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
http://www.regina-whipp.com/index_files/TipList.htm
Hi Gina,
I have a form that creates a shipping code and applies the code to
this field when that form closes:
Private Sub CmdClose_Click()
Forms!frmInvoice!txtShipmentID = invoiceID & "-" & shipmentcode
DoCmd.Close
End Sub
The field type is a text field.
I want to ensure that a user has created a shipping code BEFORE
they can select the items they wish to ship first, hence Once I
have a value I want the select checkbox to be visible but not
before.
Regards
Edd,
How exactly does the field get updated and what is the data type?
--
Gina Whipp
"I feel I have been denied critical, need to know, information!" -
Tremors II
http://www.regina-whipp.com/index_files/TipList.htm
Hi Guys,
Many thanks for those suggestions, unfortunatly neither of these
options work, or using a combination of either, i.e. using 'if is
null' rather than 'if txtShipmentID > 0 Then' and even 'if
txtShipmentID = "" Then'
To confirm Lynn the name will be changed once I have got the
event working correctly. just the way I work.
Thanks
Edd
message
First of all, you should give your checkbox a more meaningful
name, like
chkIsValid or some other such name that describes what it does.
Then do the
following in the after update event of your textbox:
If IsNull(Me.txtShipmentID) then
me.chkIsValid.Visible = False
Else
Me.chkIsValid.Visible = True
End If
Also, add the same code to the Current event of your form.
--
Lynn Trapp
(e-mail address removed)
:
I have a checkbox in my subform which is set to not visible and
only want it
visible once a value is in my main form txtShipmentID box has a
value in.
txtShipmentID is an unbound control.
I have tried this code below but I recon I am not referencing
the Checkbox
correctly??
Private Sub txtShipmentID_AfterUpdate()
Me.Form.frmInvoice.Forms.frmInvoiceLineItems.Check85.Visible =
True
End Sub