CLEAR COMBO BOX FIELD

G

Guest

I trying to clear the content typed in this field which came from a query by
using
Me.[MATRIXID] = Null

I get running time error.
"You tried to assign the Null value to a variable that is not a Variant data
type."

How do I get this to work?

Thanks
 
R

ruralguy via AccessMonster.com

Have you tried either:
Me.MATRIXID.UnDo
or
Me.MATRIXID = ""

I trying to clear the content typed in this field which came from a query by
using
Me.[MATRIXID] = Null

I get running time error.
"You tried to assign the Null value to a variable that is not a Variant data
type."

How do I get this to work?

Thanks
 
G

Guest

My row source for the field is
SELECT [LG Packaging Matrix].[MATRIXID], [LG Packaging Matrix].[UPC], [LG
Packaging Matrix].[SKU], [LG Packaging Matrix].[CUSTOMER], [LG Packaging
Matrix].[DESCRIPTION] FROM [LG Packaging Matrix] ORDER BY [LG Packaging
Matrix].[SKU];

I would like to clear this field but get running time error message. "You
tried to assign the Null value to a variable that is not a Variant data type."

Any help would be appreciate.



ruralguy via AccessMonster.com said:
Have you tried either:
Me.MATRIXID.UnDo
or
Me.MATRIXID = ""

I trying to clear the content typed in this field which came from a query by
using
Me.[MATRIXID] = Null

I get running time error.
"You tried to assign the Null value to a variable that is not a Variant data
type."

How do I get this to work?

Thanks

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

Hi Ashley,
We have a slight communication problem. ComboBox and ListBox controls have a
RowSource
but TextBoxes have a ControlSource and a form has a RecordSource. I'm not
sure what you are describing. What type of field is the [LG Packaging Matrix]
..[MATRIXID] field?
My row source for the field is
SELECT [LG Packaging Matrix].[MATRIXID], [LG Packaging Matrix].[UPC], [LG
Packaging Matrix].[SKU], [LG Packaging Matrix].[CUSTOMER], [LG Packaging
Matrix].[DESCRIPTION] FROM [LG Packaging Matrix] ORDER BY [LG Packaging
Matrix].[SKU];

I would like to clear this field but get running time error message. "You
tried to assign the Null value to a variable that is not a Variant data type."

Any help would be appreciate.
Have you tried either:
Me.MATRIXID.UnDo
[quoted text clipped - 12 lines]
 
G

Guest

data type of the [LG Packaging Matrix].[MATRIXID]field is number

ruralguy via AccessMonster.com said:
Hi Ashley,
We have a slight communication problem. ComboBox and ListBox controls have a
RowSource
but TextBoxes have a ControlSource and a form has a RecordSource. I'm not
sure what you are describing. What type of field is the [LG Packaging Matrix]
.[MATRIXID] field?
My row source for the field is
SELECT [LG Packaging Matrix].[MATRIXID], [LG Packaging Matrix].[UPC], [LG
Packaging Matrix].[SKU], [LG Packaging Matrix].[CUSTOMER], [LG Packaging
Matrix].[DESCRIPTION] FROM [LG Packaging Matrix] ORDER BY [LG Packaging
Matrix].[SKU];

I would like to clear this field but get running time error message. "You
tried to assign the Null value to a variable that is not a Variant data type."

Any help would be appreciate.
Have you tried either:
Me.MATRIXID.UnDo
[quoted text clipped - 12 lines]

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

Integer, LongInteger, Single, Double, Currency???
Where do you have your code to clear the field and what type of control is
displaying the field?
Did you try Me.MATRIXID.UnDo? What was the result?
data type of the [LG Packaging Matrix].[MATRIXID]field is number
Hi Ashley,
We have a slight communication problem. ComboBox and ListBox controls have a
[quoted text clipped - 19 lines]
 
G

Guest

It is LongInteger. I have the code in the event procedure on click. I am
trying to clear the combo box.

Me.MATRIXID.UnDo did not clear the combo box I want to clear.

Thanks

ruralguy via AccessMonster.com said:
Integer, LongInteger, Single, Double, Currency???
Where do you have your code to clear the field and what type of control is
displaying the field?
Did you try Me.MATRIXID.UnDo? What was the result?
data type of the [LG Packaging Matrix].[MATRIXID]field is number
Hi Ashley,
We have a slight communication problem. ComboBox and ListBox controls have a
[quoted text clipped - 19 lines]

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 
R

ruralguy via AccessMonster.com

What is the name of the ComboBox you want to clear?
It is LongInteger. I have the code in the event procedure on click. I am
trying to clear the combo box.

Me.MATRIXID.UnDo did not clear the combo box I want to clear.

Thanks
Integer, LongInteger, Single, Double, Currency???
Where do you have your code to clear the field and what type of control is
[quoted text clipped - 8 lines]
 
R

ruralguy via AccessMonster.com

Is the ComboBox bound to a field? Does it have a ControlSource?
It is LongInteger. I have the code in the event procedure on click. I am
trying to clear the combo box.

Me.MATRIXID.UnDo did not clear the combo box I want to clear.

Thanks
Integer, LongInteger, Single, Double, Currency???
Where do you have your code to clear the field and what type of control is
[quoted text clipped - 8 lines]
 
G

Guest

Yes, it is bound. the controlsource is MATRIXID.


ruralguy via AccessMonster.com said:
Is the ComboBox bound to a field? Does it have a ControlSource?
It is LongInteger. I have the code in the event procedure on click. I am
trying to clear the combo box.

Me.MATRIXID.UnDo did not clear the combo box I want to clear.

Thanks
Integer, LongInteger, Single, Double, Currency???
Where do you have your code to clear the field and what type of control is
[quoted text clipped - 8 lines]

--
HTH - RuralGuy (RG for short) acXP WinXP Pro
Please post back to this forum so all may benefit.

Message posted via AccessMonster.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top