View Single Post
  #2 (permalink)  
Old June 12th, 2003, 01:27 PM
shepston shepston is offline
Authorized User
 
Join Date: Jun 2003
Location: , , .
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1. The best way to handle this problem would be to write a sub that would trigger the ordering form to open and set the value of your given combo box to the product from the first form:

Code:
Private Sub cmdOrderButton_Click()

    DoCmd.OpenForm "frmProductOrder", acNormal, , "productName='" & txtProduct & "'"
    Forms!frmProductOrder.cmbProductName.Value = "Bananas"

End Sub
Where frmProductOrder is the product order form and cmbProductName is the name of your combo box or drop down list.

2. Set the RowSource property for your combo box using an SQL statement:

Code:
RowSource = "SELECT tblProductInfo.productID, tblProductInfo.productName FROM tblProductInfo;
Where tblProductInfo is the table that contains the product information.

3. The best way to do this would be to use Recordset to update the table that contains the quantities that are in stock. But it might be easier to have both forms open and have the reorder form update the value in stock form if you are not familiar with Recordsets.

Hope that helps!


[edit] Typos

-Shay Shepston
Reply With Quote