P
Philo Hamel via AccessMonster.com
I've got a problem with cascading comboboxes on a form. The form has two
comboboxes, combo1 and combo2. On the AfterUpdate event of combo1 I've got
this code:
Select Case Me.combo1
Case "Day list"
Me.combo2.Format = ""
Me.combo2 = ""
Me.combo2.Enabled = False
Case "Bill third party"
Me.combo2.Format = "00/000"
Me.combo2.RowSourceType = "Table/Query"
Me.combo2.Enabled = True
Me.combo2 = "Pick..."
Me.combo2.RowSource = "SELECT [HBadresDER].[RegNr] FROM [HBadresDER]
WHERE [HBadresDER].[Date] > 0 ORDER BY [RegNr];"
Me.combo2.SetFocus
Case "Products"
Me.combo2.Format = "00/000"
Me.combo2.RowSourceType = "Value List"
Me.combo2.Enabled = True
Me.combo2 = "Pick..."
Me.combo2.RowSource = "Everything; 10000 Technical photography; 20000
Processing; ... 90000 Digital;"
Me.combo2.SetFocus
And now the problem. When selecting "Bill third party" combo2 will show all
the RegNr available (these are integers). After selecting one RegNr and then
changing combo1 to "Products" an error occurs. The popup tells me I'm trying
to insert a text ("Pick...") into a number field (sorry if this doesn't make
any sense, but I'm using a Dutch version and I have to translate a bit). What
property of combo2 do I need to change to make it allow text again?
TIA.
Philo Hamel
comboboxes, combo1 and combo2. On the AfterUpdate event of combo1 I've got
this code:
Select Case Me.combo1
Case "Day list"
Me.combo2.Format = ""
Me.combo2 = ""
Me.combo2.Enabled = False
Case "Bill third party"
Me.combo2.Format = "00/000"
Me.combo2.RowSourceType = "Table/Query"
Me.combo2.Enabled = True
Me.combo2 = "Pick..."
Me.combo2.RowSource = "SELECT [HBadresDER].[RegNr] FROM [HBadresDER]
WHERE [HBadresDER].[Date] > 0 ORDER BY [RegNr];"
Me.combo2.SetFocus
Case "Products"
Me.combo2.Format = "00/000"
Me.combo2.RowSourceType = "Value List"
Me.combo2.Enabled = True
Me.combo2 = "Pick..."
Me.combo2.RowSource = "Everything; 10000 Technical photography; 20000
Processing; ... 90000 Digital;"
Me.combo2.SetFocus
And now the problem. When selecting "Bill third party" combo2 will show all
the RegNr available (these are integers). After selecting one RegNr and then
changing combo1 to "Products" an error occurs. The popup tells me I'm trying
to insert a text ("Pick...") into a number field (sorry if this doesn't make
any sense, but I'm using a Dutch version and I have to translate a bit). What
property of combo2 do I need to change to make it allow text again?
TIA.
Philo Hamel