473,327 Members | 2,081 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,327 software developers and data experts.

Binding fields on a continuous form

Hi all,

I have a question and really hoping you guys can help or point me to the right direction.

MY SCENARIO:
I need to design a screen which show up all the questionnaires and the users can select 1 of the checkboxes (Frequency) for each question. The users can either select Never, Few Times, 1-3 Times a month, 1-5 Times a week and Everyday.

I store all the questions in the database table, tblItem, and display them in a continuous form. In my database design, I have 3 tables to hold the data.

tblUsage - tblItem - tblFrequency -
---------------- ------------------------ --------------------------
Usage_ID Item_ID Freq_ID
Item_ID Item_Description Freq_Description
Freq_ID

QUESTION: However with this database design how can you bound the Frequency to the checkboxes display in the continuous form? Is there a better way to do this.

I was thinking of changing the tblUsage to add in more frequency fields like Freq_Never, Freq_FewTimes, Freq_1To3PerMth, Freq_1To5PerWeek, Freq_Everyday so that I can directly bound the fields to the checkboxes. However this will create data redundancy.

Please take a bit of time and help me as I’m new to Access programming and I don’t know where to turn to for help.

Thanks in advance for any help.

kind regards,
John.

Assumptions:
__1 [Freq_ID] is an AutoNumber Data Type and is the Primary Key in tblFrequency, as in:
Expand|Select|Wrap|Line Numbers
  1. Freq_ID    Freq_Description             'AutoNumber (Primary Key)
  2. 1    Never
  3. 2    Few Times
  4. 3    1-3 Times a Month
  5. 4    1-5 Times a Month
  6. 5    Everyday
A. Create a Field in tblItems called [Freq_ID] (Long Integer).
B. Create a 1 to MANY Relationship between [Freq_ID] in tblFrequency and [Freq_ID] in tblItem as in: tblFrequency.[Freq_ID](1) ==> tblItem.[Freq_ID](MANY)
C. Create a Form whose Record Source is tblItem.
D. Create an Option Group on this Form with 5 Labels to match your [Freq_Description] Field and set the value of these these Items to match the [Freq_ID] Field in tblFrequency as in:
Expand|Select|Wrap|Line Numbers
  1. Value    Option Group Labels
  2. 1    Never
  3. 2    Few Times
  4. 3    1-3 Times a Month
  5. 4    1-5 Times a Month
  6. 5    Everyday
E. Select your style fom the Wizard, No default, and store the value in the [Freq_ID] Field. Although not standard practice, you can select to use Check Boxes. Your choices will be mutually exclusive (cannot select > 1)
F. Name the Option Group fraFrequency for easy identification.

-------------------------------------------------------------------------------------------------------------------
Now, you simply enter an Item Description and select from 1 of 5 Frequencies via a Check Box. A Number between 1 and 5 will now be stored in the [Freq_ID] Field in tblItem. Should you later need a visual description of the Frequency, you can create a Query with both tblItem and tblFrequency (Link will automatically be established). Drop the [Freq_Description] Field onto the Query Grid.
-------------------------------------------------------------------------------------------------------------------
NOTE: Should you later modify or add a Frequency, the Option Group will have to be re-configured.
Mar 4 '07 #1
3 2472
NeoPa
32,556 Expert Mod 16PB
I think the answer to your question is simply to bind your Frame control to the field from the Record Source.
In the Frame's properties set Control Source to the field required.
Mar 5 '07 #2
Thanks for your help. It work well.

Thanks again.

John.
Mar 7 '07 #3
NeoPa
32,556 Expert Mod 16PB
No problem John. I'm glad it worked for you.
Mar 7 '07 #4

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

Similar topics

1
by: Marcin Floryan | last post by:
Hello! My question regards opening (and re-opening) Form and the Load event. I have a main form (frmMain) and I also have a data form (frmData). In the main form I have created: Private...
2
by: Cro | last post by:
Dear Access Developers, I am developing a form with 'default view' set to "continuous forms". I am suffering with a problem I can't yet see a solution too. Each record has many fields. Two...
2
by: Lyn | last post by:
Hi, How do you bind the output columns from a UNION query when the fields from the two tables have different names? Consider this query (WHERE clauses omitted)... SELECT SurnameBirth,...
2
by: Lyn | last post by:
Hi, I am opening a form in Continuous mode to list the records from a recordset created in the calling form. The recordset object is declared as Public and is set into the new form's Recordset...
19
by: Simon Verona | last post by:
I'm not sure if I'm going down the correct route... I have a class which exposes a number of properties of an object (in this case the object represents a customer). Can I then use this...
3
by: S P Arif Sahari Wibowo | last post by:
Hi! I would like to make an editable continous form, where most fields will be from table A and editable, except 1-3 fields are a glimpse into table B and uneditable. Table A relate to table B...
3
by: cdownload | last post by:
I have 7 fields to key to on a form. Is there a way to count the number fields that have for example, a value greater than zero?
2
by: Shawn Yates | last post by:
I have a form with two subforms on it which are both continous forms. The subform on the left shows the tasks that the employee was assigned to accomplish (each as a seperate record) while the one...
1
by: dorkboy | last post by:
Hi all, I am a newbie using VB.net in VS 2008. I took over a vb.net winform application that has a binding navigator in it. The users wanted to add 2 new fields to the form. I added the new...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.