Combo box multiple values persistence

  • Thread starter Mohammad Sibtain Arain
  • Start date
M

Mohammad Sibtain Arain

Along with other fields I have defined a field of lookup type of Value list
having "X";"Y";"Z"; i it with the multiselection option to select one or all
values.

The problem is when i created form using wizard option it gets save very
easily.
but
when i make a u.define form and add a text filed on form and set following
Data properties.
1. Data Source=Above defined field of the table;
2. Rowsource = Table of values i.e. (X,Y,Z).
3. Bound Column=0
4. Enables=Yes
5. Locked = No

When i try to save the records by assigning the combobox to the data field
it gives me "Data Type conversion error # 3421 and data just not save in the
proper record as well as mostly saved in last after skipping the error.
And I dont know what to do now? Please help if you can, i will be gratful....

Regards

M.S.Arain
 
M

Marshall Barton

Mohammad said:
Along with other fields I have defined a field of lookup type of Value list
having "X";"Y";"Z"; i it with the multiselection option to select one or all
values.

The problem is when i created form using wizard option it gets save very
easily.
but
when i make a u.define form and add a text filed on form and set following
Data properties.
1. Data Source=Above defined field of the table;
2. Rowsource = Table of values i.e. (X,Y,Z).
3. Bound Column=0
4. Enables=Yes
5. Locked = No

When i try to save the records by assigning the combobox to the data field
it gives me "Data Type conversion error # 3421 and data just not save in the
proper record as well as mostly saved in last after skipping the error.
And I dont know what to do now?

You want the BoundColumn to be 1. Using 0 mean the value
will be the index of the selected row.
 
M

Mohammad Sibtain Arain

I have tried your suggesstion but still the same problem is comming
and on following statement

rstAbsReg![Action Taken] = F_Action_Taken

Where rstAbsReg![Action Taken] is a table field of Lookup Type (Combol With
Multiselect Enabled)
&
F_Action_Taken is a Form Field
when i am trying to save the form value to the table field it shows me the
error which i explaied in my eralier post.
Regards

M.S.Arain
 
M

Marshall Barton

Sorry, but I don't know how to deal with multi select combo
boxes in VBA, especially for a lookup field. Personally, I
vehemently object to both lookup up and multi valued fields
in general. Combining them just goes beyond my mental
capacity to unravel what values are stored in which hidden
table. The Value of the field is a recordset so the code is
nothing like a normal combo box. I could buy into a user
interface that has a multi select combo box if I could do it
without the secret tables/relationships, but the new combo
box only works with the invisible structures.

Maybe someone else has unraveled these things and can come
to your assistence.
--
Marsh
MVP [MS Access]

I have tried your suggesstion but still the same problem is comming
and on following statement

rstAbsReg![Action Taken] = F_Action_Taken

Where rstAbsReg![Action Taken] is a table field of Lookup Type (Combol With
Multiselect Enabled)
&
F_Action_Taken is a Form Field
when i am trying to save the form value to the table field it shows me the
error which i explaied in my eralier post.


Marshall Barton said:
You want the BoundColumn to be 1. Using 0 mean the value
will be the index of the selected row.
 
M

Marshall Barton

Mohammad said:
did i make myself while explaining the scenario


If you do NOT have a lookup field AND you are NOT using a
multi select combo box, then you were not clear about
whatever you were trying to describe.

If you really are using a lookup field with a multi select
combo box, then I can not help.
 

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