drop down not allowing selection

E

Emma Aumack

Hi all,

In Access 2002, I have a form with a drop down box built from a query list
that is filtered on a field in the form. When the user opens the drop down,
all the correct filtered items appear. When the user goes to select the
appropriate item from the list, it appears in the text box; however, when the
user leaves the text box their selection disappears and the first available
item in the drop down list appears. How can I get the selected item to stay
in the text box?

Thank you,
 
K

Klatuu

Whatever you select in the combo should stay there. That is the normal
behavior. If it is changing, then something in your application (an event
firing you are not aware of) is causing it.

I would recommend running your app in debug mode to see what code is
actually running. My bet is something is executing you don't expect.
 
E

Emma Aumack

Correction, drop down is not allowing selection. when selection is made,
first item appears always.

I do have a On Load event this is the only code on the form:

Private Sub Form_Load()

If IsNull(OpenArgs) = False Then

txt_FK_Job_Id = Split(OpenArgs, ",")(0)
txt_Contract_Account_No = Split(OpenArgs, ",")(1)
txt_Contract_Account_Name = Split(OpenArgs, ",")(2)

End If

If Me.NewRecord Then
Me.txt_Contract_Main_No = 1 + Nz(DMax("Contract_Main_No",
"Qry_Int_Contracts_Main"), 0)
End If


End Sub

But that shouldn't effect it should it?

Sorry, I program very little and don't know how to use the debug features.
I wish I could. Do you think you can help me?

Thank you,
 
K

Klatuu

That code should not cause the problem.
What is the record source of your combo?
Send me a complete list of all the property values and I will see what I can
find.
 
E

Emma Aumack

Records source of drop down is Qry_ActGpoPrdGrpIntCnt (here is the SQL):

SELECT [BPV GPO Membership].[Account No], [Tbl_BPV GPOs].GPO_Number,
[Tbl_BPV GPOs].GPO_Name, [Tbl_BPV GPOs].Product2, [BPV GPO Membership].Level,
Mid([begin_Date],5,2) & "/" & Right([begin_date],2) & "/" &
Left([begin_date],4) AS [Member Since]
FROM [Tbl_BPV GPOs] RIGHT JOIN [BPV GPO Membership] ON [Tbl_BPV
GPOs].GPO_Number = [BPV GPO Membership].GPO
WHERE ((([BPV GPO Membership].[Account
No])=[Forms]![frm_tbl_contracts_Int].[contract_account_No]) AND (([Tbl_BPV
GPOs].GPO_Number) Is Not Null));


The Properties (excluding the Format properties) are as follows:

Data:

Record Source: Tbl_Contracts
Filter: ((Tbl_Contracts.Contract_Main_No="06723"))
Order by:
Allow filters: Yes
Allow form view: Yes
Allow Datasheet View: Yes
Allow Pivot Table view: Yes
Allow PivotChart View: Yes
Allow Edits: Yes
Allow Deletions: Yes
Allow Additions: Yes
Data entry: Yes
Recordset Type: Dynaset
Record Locks: Edited Record
Fetch Defaults: Yes


Events:

On Load: [Event Procedure] - I sent this to you already
Key Preview: No
Timer Interval: 0

Other:

Pop up: No
Modal: No
Cycle: All records
Menu Bar:
Toolbar:
Shortcut Menu: Yes
Shortcut Menu Bar:
Fast laser Printint: Yes
Help file:
Help Context ID: 0
Tag:
Has Module: Yes
Allow Design changes: all views
 
G

Graham Mandeno

Hi Emma

I think Dave wanted you to post the properties of the combo box, not the
form.

Make sure that:
1. the ControlSource of the combo box is editable and
2. the combo box does not have its Locked property set

--
Good Luck :)

Graham Mandeno [Access MVP]
Auckland, New Zealand


Emma Aumack said:
Records source of drop down is Qry_ActGpoPrdGrpIntCnt (here is the SQL):

SELECT [BPV GPO Membership].[Account No], [Tbl_BPV GPOs].GPO_Number,
[Tbl_BPV GPOs].GPO_Name, [Tbl_BPV GPOs].Product2, [BPV GPO
Membership].Level,
Mid([begin_Date],5,2) & "/" & Right([begin_date],2) & "/" &
Left([begin_date],4) AS [Member Since]
FROM [Tbl_BPV GPOs] RIGHT JOIN [BPV GPO Membership] ON [Tbl_BPV
GPOs].GPO_Number = [BPV GPO Membership].GPO
WHERE ((([BPV GPO Membership].[Account
No])=[Forms]![frm_tbl_contracts_Int].[contract_account_No]) AND (([Tbl_BPV
GPOs].GPO_Number) Is Not Null));


The Properties (excluding the Format properties) are as follows:

Data:

Record Source: Tbl_Contracts
Filter: ((Tbl_Contracts.Contract_Main_No="06723"))
Order by:
Allow filters: Yes
Allow form view: Yes
Allow Datasheet View: Yes
Allow Pivot Table view: Yes
Allow PivotChart View: Yes
Allow Edits: Yes
Allow Deletions: Yes
Allow Additions: Yes
Data entry: Yes
Recordset Type: Dynaset
Record Locks: Edited Record
Fetch Defaults: Yes


Events:

On Load: [Event Procedure] - I sent this to you already
Key Preview: No
Timer Interval: 0

Other:

Pop up: No
Modal: No
Cycle: All records
Menu Bar:
Toolbar:
Shortcut Menu: Yes
Shortcut Menu Bar:
Fast laser Printint: Yes
Help file:
Help Context ID: 0
Tag:
Has Module: Yes
Allow Design changes: all views


--
www.bardpv.com
Tempe, Arizona


Klatuu said:
That code should not cause the problem.
What is the record source of your combo?
Send me a complete list of all the property values and I will see what I
can
find.
 

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