I
Ivor Williams
I've a form with an unbound combo box Combo44. The combo box Data Source is
the following:
SELECT tblCustomers.Cust, qryCustomerBuildings.CustBuildID,
qryCustomerBuildings.BuildName FROM qryCustomerBuildings INNER JOIN
tblCustomers ON qryCustomerBuildings.Cust=tblCustomers.CustID ORDER BY
tblCustomers.Cust, qryCustomerBuildings.BuildName;
The Bound Column is set to column 2, Column Count is 3, Column Widths are
1";0";1".
In the Not in List event of the combo box I've added the following code:
Private Sub Combo44_NotInList(NewData As String, Response As Integer)
DoCmd.OpenForm "frmNewCustomer", , , , , acDialog
Response = acDataErrAdded
End Sub
The problem I'm having is that I have to close and re-open the form in order
to get it to populate the record with the proper data. Not sure what's wrong
here.
Ivor
the following:
SELECT tblCustomers.Cust, qryCustomerBuildings.CustBuildID,
qryCustomerBuildings.BuildName FROM qryCustomerBuildings INNER JOIN
tblCustomers ON qryCustomerBuildings.Cust=tblCustomers.CustID ORDER BY
tblCustomers.Cust, qryCustomerBuildings.BuildName;
The Bound Column is set to column 2, Column Count is 3, Column Widths are
1";0";1".
In the Not in List event of the combo box I've added the following code:
Private Sub Combo44_NotInList(NewData As String, Response As Integer)
DoCmd.OpenForm "frmNewCustomer", , , , , acDialog
Response = acDataErrAdded
End Sub
The problem I'm having is that I have to close and re-open the form in order
to get it to populate the record with the proper data. Not sure what's wrong
here.
Ivor