I am having problems with storing a value from a combo box in a VBA variable. The code I have been using has worked wonderfully, however, I am having a problem when I reference a column in the combo box beyond 2.
ex: strcboEmployeeType = Me!cboEmployee.Column(3)
I always get an error message that says "Invalid use of Null" and highlights that line. I have checked that the row source for my combo box references the correct field in my query (SELECT [QryLogOn].[Name], [QryLogOn].[Password], [QryLogOn].[EmployeeID], [QryLogOn].[EmployeeType] FROM QryLogOn; ), and that my query references the correct field in my table, and that the Employee Type field is not null in either the table or the query. I can type
Print Me!cboEmployee.Column(3) into the "Immediate" window when I am debugging, and it returns "Null." Can a combo box not hold more than 3 columns? Is there a way around this?
Also, (if I get this working) should I change strcboEmployeeType to a boolean since it references a Yes/No field, or is it ok to leave it as a string?
I would appreciate any help!
Josh C.
ex: strcboEmployeeType = Me!cboEmployee.Column(3)
I always get an error message that says "Invalid use of Null" and highlights that line. I have checked that the row source for my combo box references the correct field in my query (SELECT [QryLogOn].[Name], [QryLogOn].[Password], [QryLogOn].[EmployeeID], [QryLogOn].[EmployeeType] FROM QryLogOn; ), and that my query references the correct field in my table, and that the Employee Type field is not null in either the table or the query. I can type
Print Me!cboEmployee.Column(3) into the "Immediate" window when I am debugging, and it returns "Null." Can a combo box not hold more than 3 columns? Is there a way around this?
Also, (if I get this working) should I change strcboEmployeeType to a boolean since it references a Yes/No field, or is it ok to leave it as a string?
I would appreciate any help!
Josh C.