ComboBox is populated but not visible.

L

larpup

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, after entering in
data, the following code
executes.

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

My problem is that all textboxes are populated INLCUDING THE combobox,
however, the data in the combobox is not visible. (The combox box
control source is a field (ShprId) on the form. It is prior (in tab
order) to the combox box.


The reason I am using OpenArgs is that I am using one table (with an
alias) to use it for two comboboxes.

When I use the debugger, it shows the correct ShprId number even though
not visible. I have tried a refresh, but to no avail.

Any assistance would be greatly appreciated.


Lar
 
L

larpup

larpup said:
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, after entering in
data, the following code
executes.

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

My problem is that all textboxes are populated INLCUDING THE combobox,
however, the data in the combobox is not visible. (The combox box
control source is a field (ShprId) on the form. It is prior (in tab
order) to the combox box.


The reason I am using OpenArgs is that I am using one table (with an
alias) to use it for two comboboxes.

When I use the debugger, it shows the correct ShprId number even though
not visible. I have tried a refresh, but to no avail.

Any assistance would be greatly appreciated.
I've set the ControlSource property to the corresponding field in the table for the main form and bound to column 1 as column 0 is the ShprId... Hope I'm making myself clear here. I've done dozens of comboboxes and for the life of me don't know why this one is not displaying the data. Lastly, if you drop down the combobox, the data does not display until the form is closed, despite the debugger shows the correct information.
 

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