473,394 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Populating a ComboBox RowSource on a Continuous Form

howdy scriptors… here’s my question:

Project Background:
I’m creating a database that will hold questionnaire data.

Situation:
I would like to set up a combobox with a changing rowsource property on a continuous form. I have created a query for the record source so that the text value of the rowsource property is included as a separate field for each record. I have call this field: [AnsRowSource] and an example of the text is: (1;Yes;2;No).

Question:
How do I populate the combobox rowsource so that is changes with every record?

System Environment:
- I’m using Access 2000
Jan 17 '07 #1
4 8432
nico5038
3,080 Expert 2GB
A combobox with changing rowsource won't work on a continuous form.
For answers I just use a separate row in a table and that's allowing me even to have multiple choice questions with as many posible answers as I need.
I created a questionnair with one general Q&A table and that's copied into a Students Q&A table by adding the StudentID so each student has it's own set of answers.

Getting the idea ?

Nic;o)
Jan 17 '07 #2
hi nico,

thanks for your feedback, I think that what you are suggesting is that I have a table where the columns are the questions, the rows are the students, and the cells are the answers for the corresponding question and student. I have created tables like this in the past however when you create a form to collect the data, you have to 'place' the question and answer objects in the form (thias makes it harder for other non-programming people to come along and add, delete or edit questions.

What I was trying to do instead, was to have a continuous form that loaded the relevant questions automatically and then stored them in a long format where a single row has the student id, question id, the chosen answer, and a timedate stamp (so that a 20 questions would be stored as 20 rows for every student as opposed to a single row for each student with 20 columns).

If you have any suggestions I'd love to hear back.

regards,
leanne



A combobox with changing rowsource won't work on a continuous form.
For answers I just use a separate row in a table and that's allowing me even to have multiple choice questions with as many posible answers as I need.
I created a questionnair with one general Q&A table and that's copied into a Students Q&A table by adding the StudentID so each student has it's own set of answers.

Getting the idea ?

Nic;o)
Jan 30 '07 #3
JanM
7
Hi Leanne,

I'm working on a similar flexible Q&A database and came across the same problem you have. Yesterday I found a solution for it by putting a textbox on top of the combobox (by leaving the combobox dropdown arrow visible). The textbox contains as rowsource a DLookup() where it points to the description of the answer-ID as given in the current record. The combobox has a requery so the correct list of possible answers is shown on every record.

The endresult is that you use the arrow of the combobox to make the selection of the answer, but the answer itself is visible via the textbox.

Some backgroundinfo I found on the way to the solution: in KB208866 (on support.microsoft.com) is stated "Microsoft Access maintains only one query recordset for a combo box rather than one recordset for each combo box in each record.". So no matter what you will attempt with the combobox alone you will never succeed.
In KB209738 in method 3 the DLookup is given as workaround.

Regards,
Jan
Feb 1 '07 #4
Hi Jan,

Thank you so much for your post. I think this will work as a solution to my problem.

Regards,
Leanne

Hi Leanne,

I'm working on a similar flexible Q&A database and came across the same problem you have. Yesterday I found a solution for it by putting a textbox on top of the combobox (by leaving the combobox dropdown arrow visible). The textbox contains as rowsource a DLookup() where it points to the description of the answer-ID as given in the current record. The combobox has a requery so the correct list of possible answers is shown on every record.

The endresult is that you use the arrow of the combobox to make the selection of the answer, but the answer itself is visible via the textbox.

Some backgroundinfo I found on the way to the solution: in KB208866 (on support.microsoft.com) is stated "Microsoft Access maintains only one query recordset for a combo box rather than one recordset for each combo box in each record.". So no matter what you will attempt with the combobox alone you will never succeed.
In KB209738 in method 3 the DLookup is given as workaround.

Regards,
Jan
Feb 7 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: B | last post by:
I know there are several ways to speed up combo boxes and form loading. Most of the solutions leave rowsource of the combo box blank and set the rowsource to a saved query or an SQL with a where...
1
by: Marcia | last post by:
I have a combobox for types of music and a combobox for artists. The rowsource query for the artists combobox associates artists with different types of music. In the query I use the name of the...
1
by: tmuhammad | last post by:
Hi there, I am trying to populate a continuous form using ADO, following is the function which needs fixing, can someone kindly help me with this. Thanks much Private Sub Form_Load() On Error...
4
by: Kathy | last post by:
What is the standard technique for handling the fields in the following scenario on a continuous form? Multiple Divisions. Each Division has multiple Buildings. Each Building has a Supervisor. ...
10
by: DFS | last post by:
I'm sure this has been discussed before, but I'm too tired to hunt for it. I have a survey table containing questions with different answer scales. Some are 1 to 5, others are A,B,C, etc. I show...
3
by: Stewart | last post by:
Hi all! My (relatively small) database holds data on staff members and the projects (services) that they are assigned to. In my form frmStaff, I have a list of staff members - it is a...
1
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the...
2
by: troy_lee | last post by:
I have a subform being displayed as a continuous form. One of the fields for each record is a combo box with two options- removal or installation. How do I color all the fields for the row based...
4
by: prashantdixit | last post by:
Hi, I have imported huge log file (35 MB size) into a worksheet. One of its column contain some data. There is a Main Sheet which contains "ComboBoxStartTime" ActiveX Combo control. I am...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.