I have a quote form (frmQuoteHdr), where the user can create an invoice when the quote is accepted. When the quote is accepted, the cmdMakeInvoice button becomes visible. The On Click code executes (as below), except the final part, making the CustomerID the focus. I get the message "MS Access can't move the focus to the control CustomerID".
Any ideas would be appreciated as I am just finding my feet with Access and especially using VBA.
Regards
Private Sub cmdMakeInvoice_Click()
Dim strDocName As String, strDonName1 As String
strDocName = "qryDeleteTmp"
strDocName1 = "qryAppendTmp"
DoCmd.SetWarnings False
DoCmd.OpenQuery strDocName
DoCmd.OpenQuery strDocName1
If (Me.chkInstall = -1) Then
Call InstalmentInvoice
Else
Call NormalInvoice
End If
Forms!frmQuoteHdr!CustomerId.SetFocus
End Sub
Any ideas would be appreciated as I am just finding my feet with Access and especially using VBA.
Regards
Private Sub cmdMakeInvoice_Click()
Dim strDocName As String, strDonName1 As String
strDocName = "qryDeleteTmp"
strDocName1 = "qryAppendTmp"
DoCmd.SetWarnings False
DoCmd.OpenQuery strDocName
DoCmd.OpenQuery strDocName1
If (Me.chkInstall = -1) Then
Call InstalmentInvoice
Else
Call NormalInvoice
End If
Forms!frmQuoteHdr!CustomerId.SetFocus
End Sub