Combo box works intermittently

RenaG

Registered User.
Local time
Today, 01:29
Joined
Mar 29, 2011
Messages
166
I am working in Access 2007.

I have a main form that has a tabbed page with several subforms. On the first tab is one subform that has a combo box and a text field. When the user enters data into this subform, a record is written to tblActivities. tblActivities has 4 fields:

AID (PK) ~~ EventID ~~ ActivityID ~~ Comments

The combo box on the subform points to lookupTable for its RowSource. The form is set as a Continuous Form.

When I open this form to add a record, I can add multiple Activities; once I add one activity, another blank record opens below to allow me to add another.

If I close the record and return later to update it, the activity combo box will not allow me to add any more activities.

There are subforms on the other tabs set up this way too but none of them behave this way.

Any suggestions on why this one subform acts one way on a new record and another way on update?

TIA!

~RLG
 
You may have some corruption in your db. Suggest you run a compact and repair.

Alan
 
Good morning,

Good suggestion. I did that then clicked on the button that opens an existing record. It gave me a Cannot Return without GoSub (or something like that). So I opened VB and ran the compile (which is what has worked in the past to fix that error). When I open an existing record, it still will not let me add a new Activity. When I start a new record I can add a new Activity but I forgot to mention in my first post that I have to click the down arrow twice to get the drop down box to appear.

TIA,
~RLG
 
maybe you have code that locks all controls in an existing record - that would stop a combo box working, although it would still open.

also maybe you need to modify the current event to pick up the right settings for an existing item

if the recordset is non updateable, or allowedits is false, that would also stop a cbobox working fully.
 
Hey Dave,

Thanks for your response!

maybe you have code that locks all controls in an existing record - that would stop a combo box working, although it would still open.

I don't know how to do this so it isn't likely that this lock exists.

I have compared all the property sheet line items for this one to a subform that works and can't see any difference. Would the problem be with the form or the combo box? I have looked at both but wondered where to focus my attention.

What stumps me is that it works when adding a new Event record and doesn't when trying to modify (add an Activity) to an existing Event record. It's the same subform!

I am half tempted to delete the subform and start over. That would probably take less time but it would be nice to figure out what is happening so that if this happens again I'll know how to fix it.

Thanks!
~RLG
 
try and open the query on which the problem form is based.

now try and change something in the query

if you cant, then the query is non-updateable, and that is the problem

if you can, its a different issue
 

Users who are viewing this thread

Back
Top Bottom