Hi all!
This forum has been very usefully for the Access Beginners like me. I believe my problem can only be solved in this forum.
I have two tables (tblCustomers and tblOrders)and one form (frmOrders)for data entry, tblCustomers has the following fields:
CoID (Autonumber)
CustomerID (Text,PK)
CustomerFullNam e(Text)
The tblOrders has the following fields:
OrderID (Autonumber, PK)
CustomerID (Lookup Text from tblCustomers.Cu stomerID)
Product (Text)
Quantity (Text)
Price (Currency)
I set a frmOrders to be a combobox of which RowSource=SELEC T [tblCustomers].[CustomerID] FROM tblCustomers WHERE tblCustomers.Co ID=Forms!frmOrd ers!OrderID;
and the AfterUpdate event of [frmOders]![OrderID] set to
Private Sub OrderID_AfterUp date()
CustomerID.SetF ocus
Me.CustomerID.S elected(0) = True
End Sub
The intesion is to keep the first value of Combobox to showup without manually select it. But instead it keep its value waiting for selection.
Where did I do wrong on this?
Please help!
This forum has been very usefully for the Access Beginners like me. I believe my problem can only be solved in this forum.
I have two tables (tblCustomers and tblOrders)and one form (frmOrders)for data entry, tblCustomers has the following fields:
CoID (Autonumber)
CustomerID (Text,PK)
CustomerFullNam e(Text)
The tblOrders has the following fields:
OrderID (Autonumber, PK)
CustomerID (Lookup Text from tblCustomers.Cu stomerID)
Product (Text)
Quantity (Text)
Price (Currency)
I set a frmOrders to be a combobox of which RowSource=SELEC T [tblCustomers].[CustomerID] FROM tblCustomers WHERE tblCustomers.Co ID=Forms!frmOrd ers!OrderID;
and the AfterUpdate event of [frmOders]![OrderID] set to
Private Sub OrderID_AfterUp date()
CustomerID.SetF ocus
Me.CustomerID.S elected(0) = True
End Sub
The intesion is to keep the first value of Combobox to showup without manually select it. But instead it keep its value waiting for selection.
Where did I do wrong on this?
Please help!
Comment