The Problem With Other... (1 Viewer)

M

mission2java_78

Guest
Here's the situation. I have to use a combo box...because ortiginally I used a text box and things were going out of proportion. Basically I created a table of standard tasks that are used on jobs. I used this table as the rowsource of a field in another table tblTasks. One of the values in the combo box is other...but I want to be able to add additional information if Other is selected...BUT I do not want an extra text field to hold this data...Imagine about 4 fields StdTask (The combo box), PStart (a start date), PFinish (a finish date), MFinish (Must Finish), and Completed (check box)...there are several other fields not worth mentioninng..now If the user selects "Other" from the StdTask combo box than I want to be able to add additional data to describe "Other". I do not want to use Not In List event either because I'd have wayyy too many records added to this table.

Any help is greatly appreciated.
Jon
 

Dave Eyley

Registered User.
Local time
Today, 13:55
Joined
Sep 5, 2002
Messages
254
Hi Jon,

I would consider another table called say, 'OtherInfo', which would be linked via a 1 to Many to the primarykey of the table holding the main data.

That way a record for extra data would only be created when the 'Other' option is selected. The form text field would only appear when 'Other' is selected.

You wouldn't have loads of unused fields in the main table either.

I hope this what you're looking for....

Dave E
 
M

mission2java_78

Guest
I was thinking the same but what do you mean the text field would open only when other is selected? Is this text field from my original tasks table or from this table? Would I just hide the combo box and make this text field visible?

Jon
 
M

mission2java_78

Guest
How would I show this other field? Currently the form's record source is based on tblTasks. If I had a table tblOtherTasks...and had a text field to enter "Other Description" how would I go about placing this on the form...How would I make it visible only on other...I know I can use the afterupdate event..but am I on the same track as you?
Jon
 

Dave Eyley

Registered User.
Local time
Today, 13:55
Joined
Sep 5, 2002
Messages
254
Hi Jon,

It's easy to go off on the wrong track when reading these forum messages and to blindly speil off solutions to misunderstood problems. But I think I'm with you on this one.

On the main form, could you have the combo where you select ther 'Other' option and if the Other option is picked then the afterupdate of the combo makes an invisible field visible for the addition of the extra data.

Or, the afterupdate opens a pop-up form with just the one field to add the data.

Are either of these suitable?

Dave E
 
M

mission2java_78

Guest
Where is this other field? THe problem here is this subform is continous so Im pretty sure with continous forms when you make a field visible on one record they become visible on all records. Correct me if I'm wrong with that.
Jon
 
R

Rich

Guest
Click the "Other" check box on the example
 
Last edited:
M

mission2java_78

Guest
That's right other is bound to some control i.e its a field so it wont mark off all the check boxes forgot. But your example shows the text box even if other is clicked...see mine is a combo box of standard tasks...but if other is selected I want to be able to be more descriptive with this task...should I create anothr table to handle this? Or should I waste a field in the current table? And use it only on other?

Jon
 
R

Rich

Guest
Will empty records be wasted space, or will another table add more to the db size? One for the theorists I think:confused:
 
M

mission2java_78

Guest
Well the thing is ... its a field that may be empty one field. See right now we use a task field and people just enter text..to input the task. I was thinking a combo box since many of the times its the same task over and over rather than typing it...should I do the following:

Use a new table with tblStandardTasks...add a field to the current table cboStandardTasks. Keep the original text field but populate it based on the value of the selected item in this new combo box. If they select other allow them to add additional text?

Sound ok or no ?

Jon
 
R

Rich

Guest
You would only have to store the PK of course, the only problem is that if you end up with numerous "others" in the look up table, users don't seem to be able to apply logic when let loose, you might find it advantageous to limit the number of tasks they can have
 
M

mission2java_78

Guest
Hey rich,

I dont know if this is possible but i have acombo box of tasks with "Other" as a choice. This combo box takes its record source from a table. This control is bound to a field StdTaskID to a table tblTasks. In the code after update event behind the combo box..I have the following:

If Me.cboTask.Column(1) = "Other" Then
Me.txtTask.Visible = True
Me.txtTask.SetFocus
Me.cboTask.Visible = False
Else
Me.txtTask.Visible = False
Me.cboTask.Visible = True
Me.cboTask.SetFocus
End If

This is a continous form therefore the combo box hides on every record...isnt there a way to stop this from happening? Or will I need to use the on current event to make it visible again?

Jon
 

Users who are viewing this thread

Top Bottom