Can't select any item in ComboBox

djhal3

New member
Local time
Today, 08:17
Joined
Feb 15, 2016
Messages
3
Hi,

Hope you Access folk can help. This has been doing my head in for 2 days - I'm teaching myself Access and can't get past this problem...

Back Story: I've just about finished essentially replicating the "Services" Database template from Microsoft. I set out replicating it to a desktop database because the template is a web app database and unable to be customised to what I needed. I have my Tables, Queries, Forms and all macros all now fully replicated and functional except one bit.

Problem: I have bound ComboBox within a ControlTab (with a row source to a query shown below). Everything displays correctly in the list of values in the dropdown box - except I can't select/click anything - nothing happens when I click. I have tried recreating the ComboBox, the recreating the ControlTab, recreating the queries... nothing fixes the problem!?

From what I see in the Property Sheet of the subform and master form, nothing marked as Locked, everything is enabled both forms Allow Edits.

To give you an idea... this form named 'QuoteDetail' and consists of a master form containing ControlTab with 2 subforms (one for ServiceLineItems and one for ProductLineItems). First I select from a ComboBox for Customers in the master form, which works fine and I can select customers... and then I attempt to select a Service/ProductLineItemCode from the ComboBox in the subform and there's my problem... nothing happens when I click on any of the dropdown items.. no error, it just doesn't allow me to select an item/value.

Several observations lead me to believe I am very close to finding a solution... but I just can't put my finger on it:
(1) I have a perfectly working Invoices Form with similar ComboBox arrangement... but this ComboBox for the Quotes form - which was created the same way I did the invoices - just won't work.
(2) Link Master field and Link Child field for subform should both be correct as they work in the Invoices form...
(3) However, strangely what does work to fix this problem is when I select a customer from the ComboBox in the Master field and then if I put the form into 'display view' and back again into 'form view', I am THEN able to select my LineItemCodeID from the Combobox in the subform... Also just opening the subform itself as a form I am able to select LineItemCodeID without a problem....

- Am I missing a relationship?
- Have I made an error in copying and pasting my macros over from the original template and this is secretly messing it up?
- The real structural difference in this non-functional Quotes form and the functional Invoices form is the Filter property (for the master form which is [ID]=[TempVars]![tmpID]... while for Invoices form it is [ID]=[ReturnVars]![retDuplicateInvoiceID]. I have also tried substituting the latter with the word retDuplicateQuoteID to no avail...
- I'm using a tiny bit of VBA (located in the events Tab of the property sheet - 'On Change') to automatically population the description unit price fields of my subform. These work perfectly when I open the subform up as a form itself, and again works perfectly for products and services forms for Invoices. Is it possible my VBA code is messing something up?

Any ideas at all?

PROPERTIES
ComboBox in Subform
Control Source: LineItemCodeID - this is a field in a table from a query (on which the form is based)
Row Source: SELECT ServiceLineItemCodes.ID, ServiceLineItemCodes.LineItemCode, ServiceLineItemCodes.DefaultDescription FROM ServiceLineItemCodes ORDER BY ServiceLineItemCodes.ServiceCode;
Column Count: 3
Bound Column: 1
Column Widths: 0cm;2.542cm;2.542cm
Enabled: Yes
Locked: No

Subform
Link Master field: ID (from Quotes Table)
Link Child field: QuoteID (from QuoteServiceLineItems query)
 
Sounds to me a little like the initial design was based on flow...
First select first combobox. If selection is OK, second is enabled.

Maybe place another box on the same tab, just to look if you can edit this one.... If not, than something happens with the tab.

Search <Cntrl><Find> yourcontrol.enabled or yourcontrol.locked in your code (on project level).
if not, I think you have to upload this part of you db to let people look at it
 
Sounds to me a little like the initial design was based on flow...
First select first combobox. If selection is OK, second is enabled.

Maybe place another box on the same tab, just to look if you can edit this one.... If not, than something happens with the tab.

Search <Cntrl><Find> yourcontrol.enabled or yourcontrol.locked in your code (on project level).
if not, I think you have to upload this part of you db to let people look at it


Thanks boerbende, I was just about try what you suggested and I finally found it!
Isn't it funny how you bang your head against a wall for 2 days and the moment you ask a question, you find the answer yourself...

So, there was a macro missing on the combobox (customerID) on the master form. the macro missing was 'On Click'.... and its role seems to be to set customer details and form state when you update the customer ID... without it, my subform combobox control was locked....

Thanks again for your help. This might not be the last question I have about this DB :)
 

Users who are viewing this thread

Back
Top Bottom