problem with combobox

L

larpup

I have a button on a form (that opens a new form) to add a new shipper.
When the user clicks on the (close form) button, the following code
executes.

My problem is that all textboxes are populated except the combobox.

The reason I am using OpenArgs is that I am using one table (with an
alias) to use it for My Shipper and Consignee. Here is the code that is
supposed to populate the combobox. When I use the debugger, it works
fine and shows the correct ShprId number. I have tried a refresh, but
to no avail.

Any assistance would be greatly appreciated.

Lar


On Error GoTo Err_Command31_Click
If Me.OpenArgs = "ShprId" Then
Forms!frmNewPickup!ShprId = Form_FrmShippers.ShprConsID
ElseIf Me.OpenArgs = "ConsId" Then
Forms!frmNewPickup!ConsId = Form_FrmShippers.ShprConsID
End If

DoCmd.Close


Exit_Command31_Click:
Exit Sub

Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top