G
Guest
I have a main form (parent) which has a number of fields. It also has a tab
control. This has a number of headers including one called Invoicing. The
Invoicing Tab has a sub form called InvoiceTAB. From a field on the
InvoiceTAB subform I open another form so the user can input some data. On
this second form I have an option group which the user should select from and
it will do different things. Unfortunately the code I used comes up with an
error. The code is as follows:
Select Case Me.Frame17
Case 1 ' No invoice required shows textbox to input reason
TxtboxNoInvoice.Visible = True
Case 2 ' as per job description
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
Me.Parent.[InvoiceTAB]![description] = Me.Parent.description
DoCmd.Close
Case 3 ' as per child number
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
Me.Parent.[InvoiceTAB]![description] = Me.Parent.[child
subform]![Title]
DoCmd.Close
Case 4 ' as per invoice
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
MsgBox "cut and paste"
DoCmd.Close
Case 5 ' Stamp Duty
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
Me!Parent.[InvoiceTAB]![description] = "Stamp Duty"
Case 6 'other
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = True
End Select
End Sub
The error I get is when the code reaches:
Me.Parent.[InvoiceTAB]![description] = Me.Parent.description
The error states: The expression you have entered has an invalid reference
to the parent property
Can anyone help please
Thanks
control. This has a number of headers including one called Invoicing. The
Invoicing Tab has a sub form called InvoiceTAB. From a field on the
InvoiceTAB subform I open another form so the user can input some data. On
this second form I have an option group which the user should select from and
it will do different things. Unfortunately the code I used comes up with an
error. The code is as follows:
Select Case Me.Frame17
Case 1 ' No invoice required shows textbox to input reason
TxtboxNoInvoice.Visible = True
Case 2 ' as per job description
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
Me.Parent.[InvoiceTAB]![description] = Me.Parent.description
DoCmd.Close
Case 3 ' as per child number
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
Me.Parent.[InvoiceTAB]![description] = Me.Parent.[child
subform]![Title]
DoCmd.Close
Case 4 ' as per invoice
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
MsgBox "cut and paste"
DoCmd.Close
Case 5 ' Stamp Duty
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = False
Me!Parent.[InvoiceTAB]![description] = "Stamp Duty"
Case 6 'other
TxtboxNoInvoice.Visible = False
TxtBoxOther.Visible = True
End Select
End Sub
The error I get is when the code reaches:
Me.Parent.[InvoiceTAB]![description] = Me.Parent.description
The error states: The expression you have entered has an invalid reference
to the parent property
Can anyone help please
Thanks