Missing the obvious

DreamGenius

Annoying Questionner
Local time
Today, 18:51
Joined
Jul 29, 2004
Messages
116
I'm building a GUI to an existing database, starting with a form that contains various subforms, each of which shows categories of data from the database. Each subform is linked to the master form correctly using parent-children relationships and, once a record is selected, these work.

However, and here's where I'm missing the blindingly obvious I think, is that the combo box I'm using in lieu of a record selector isn't selectable! Here are the properties of the combo box:
Code:
Combo Box: Member
AllowAutoCorrect: True
AutoExpand:       True
BackColor:        16777215
BackStyle:        Normal
BorderColor:      10040115
BorderLineStyle:  Solid
BorderStyle:      Solid
BorderWidth:      Hairline
BoundColumn       1
ColumnCount:      1
ColumnHeads       False
ColumnHidde       False
ColumnOrder:      Default
ColumnWidth:      Default
ControlType:      111
DecimalPlace      Auto
DefaultValue:     "010203"
DisplayWhen:      Always
Enabled:          True
EventProcPrefi    Member
FontBold:         No
FontItalic:       False
FontName:         Tahoma
FontSize:         16
FontUnderline:    False
FontWeight:       Normal
ForeColor:        0
Height:           450
HelpContextId:    0
IMEHold:          False
IMEMode:          0
IMESentenceMode:  3
IsHyperlink:      False
KeyboardLanguage: 0
Left:             56
LimitToList:      True
ListRows:         8
ListWidth:        0
Locked:           False
Name:             Member
NumeralShap       System
OldBorderStyle    1
OnChange:         [Event Procedure]
ReadingOrder:     Context
RowSource:        Select [MEMBER] From [MEMBERS]
RowSourceType:    Table/Query
ScrollBarAlign:   System
Section:          0
SpecialEffect:    Flat
StatusBarText:    Enter Member Serial Number
TabIndex:         0
TabStop:          True
TextAlign:        General
TextFontCharS     0
Top:              623
Visible:          True
Width:            2154
The [Event Procedure] referred to is simply Me.Form.Requery and the purpose of the combo box is to simply select a member number from a drop-down list, whereupon the relevent attached data is displayed on the form and subforms, for perusal and editing.

The combo box is populated but not selectable - you can't click on an entry and it display the data for that member. Nor can you type in the combo box to select an entry.

Clues?
 
One thing that prevents a items in comboboxes from being selectable is the form they reside on having AllowEdits set to No. And remember that if a main form has this set, the subforms inherit the setting.
 
Missinglinq's solution solved my problem, for which thank you, but the other information is also mighty useful, so thank you boblarson as well.
 
Fixing that has highlighted another problem and, as it's still form-related and probably equally blindingly obvious to somebody that knows, I'll keep it in the same thread.

On my subforms I have unbound text boxes where users can enter new data for the database and which are populated using references to the latest record displayed in bound text boxes displayed on the same sub-form but are locked.

The reason for doing it this way is so that the latest record is always visible but can't be changed, it can only be superceded by entering new data into the unbound boxes and clicking the command button that fires an insert query.

However, when I change the Member number, the main form and all sub-forms change correctly but the unbound boxes don't update to reflect the new data being displayed. I already have a Me.Form.Requery in an Event Proedure based on Data Change but that ain't delivering.

Clues? Thanks in advance.
 
unbound boxes wouldnt change, would they

you will have a current event firing at this time, so you need to set the unbound boxes as appropriate in the current event i would think
 
David Eager, is that at form level or text box level?

gemma-the-husky, if I understand correctly then, these are populated at the time of loading the form, with the data from the first query. How do I then get them to regenerate (trying to avoid access terminology) each time the query changes. Is David Eager sending me in the right direction?

Thanks for the swift responses
 
An unbound textbox is...well...unbound! It's not going to change by using Requery or Refresh because it's not connected to a Record Source! It's only going to change if you physically enter data into it or assign a value to it in code, with a line such as Me.UnboundTextBox = "Something" or Me.UnboundTextBox = Date(). In other words, you have to place a value in an unbound textbox, Access isn't going to do it for you!
 
Well, I did say that I was missing the obvious - I have just enough information or knowledge to be lethal!

So, if I move the formulae that populate those unbound text boxes to the VBA module behind each form, which event would be best as the trigger to update them as the Member field is changed on the main form and the data on the sub-forms changes?
 
Bump - just in case this got buried in a flurry of new topics
 

Users who are viewing this thread

Back
Top Bottom