473,395 Members | 1,595 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,395 software developers and data experts.

Create Dynamically Built Data-Entry form to enter data into two tables

Hi Everyone,

I'm generally unfamiliar with Access form design, but have programmed
Cold Fusion applications for a couple of years.

I'd like to build a data entry form in Access that allows the
following.

First, the data schema: Three tables are involved. The first is a
PERSONS table which has two fields, SSNUMBER (primary key), and NAME.
The second table is GROUPS, which has two fields, GROUPID (primary key)
and GROUPNAME. Each person can be a member of 0, 1, or many groups. I
created a linking table PERSONS_GROUPS which has two fields, SSNUMBER
and GROUPID, which together comprise the primary key.

In Cold Fusion, I was able to easily build a form to allow the user to
enter both a new PERSON and also specify each group they were a member
of in a single input form. I built the form by first having a data
entry field for SSNUMBER AND NAME. Then I would query the GROUPS table
to build the remainder of the form with checkboxes for each available
group. Thus, the user could type in the SSNUMBER and NAME, and then
CHECK each box for the groups that the person was a member of. Then
when they submitted the form, the person was entered into the PERSONS
table via an insert query, and an entry for each group that was checked
was entered in the PERSONS_GROUPS table via separate input queries.
The nice thing about this dynamicly built data entry form was that as
new groups were entered in the database, there was no need to change
the data entry form.

I'd like to do the same thing with MS Access forms, but I'm not sure
how to do it. Could someone point me in the right direction on this?

Thanks.

Phil

Dec 26 '05 #1
2 5029

<fi********@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi Everyone,

I'm generally unfamiliar with Access form design, but have programmed
Cold Fusion applications for a couple of years.

I'd like to build a data entry form in Access that allows the
following.

First, the data schema: Three tables are involved. The first is a
PERSONS table which has two fields, SSNUMBER (primary key), and NAME.
The second table is GROUPS, which has two fields, GROUPID (primary key)
and GROUPNAME. Each person can be a member of 0, 1, or many groups. I
created a linking table PERSONS_GROUPS which has two fields, SSNUMBER
and GROUPID, which together comprise the primary key.

In Cold Fusion, I was able to easily build a form to allow the user to
enter both a new PERSON and also specify each group they were a member
of in a single input form. I built the form by first having a data
entry field for SSNUMBER AND NAME. Then I would query the GROUPS table
to build the remainder of the form with checkboxes for each available
group. Thus, the user could type in the SSNUMBER and NAME, and then
CHECK each box for the groups that the person was a member of. Then
when they submitted the form, the person was entered into the PERSONS
table via an insert query, and an entry for each group that was checked
was entered in the PERSONS_GROUPS table via separate input queries.
The nice thing about this dynamicly built data entry form was that as
new groups were entered in the database, there was no need to change
the data entry form.

I'd like to do the same thing with MS Access forms, but I'm not sure
how to do it. Could someone point me in the right direction on this?

Thanks.

Phil


If you are not compelled to use checkboxes and labels -- which, of course,
is only one way to accomplish your purpose, you may be able to do what you
want with a Form and a Subform Control, embedding a Form that allows
selection of a Group to create the junction table you describe. To select,
use a Combo Box, including but not showing the Group ID, but showing the
Group's description. With a little care, my guess is that you can do it
using static forms, and bound forms, so you won't even have to write code to
add the records to the junction table.

It isn't exactly the interface you had in mind, but doesn't seem a great
burden on the user to choose one item from a dropdown list, instead of
having check boxes or radio buttons with labels.

Larry Linson
Microsoft Access MVP
Dec 26 '05 #2
fi********@gmail.com wrote in
news:11**********************@g44g2000cwa.googlegr oups.com:
I'm generally unfamiliar with Access form design, but have
programmed Cold Fusion applications for a couple of years.

I'd like to build a data entry form in Access that allows the
following.

First, the data schema: Three tables are involved. The first is
a PERSONS table which has two fields, SSNUMBER (primary key), and
NAME. The second table is GROUPS, which has two fields, GROUPID
(primary key) and GROUPNAME. Each person can be a member of 0, 1,
or many groups. I created a linking table PERSONS_GROUPS which
has two fields, SSNUMBER and GROUPID, which together comprise the
primary key.

In Cold Fusion, I was able to easily build a form to allow the
user to enter both a new PERSON and also specify each group they
were a member of in a single input form. I built the form by
first having a data entry field for SSNUMBER AND NAME. Then I
would query the GROUPS table to build the remainder of the form
with checkboxes for each available group. Thus, the user could
type in the SSNUMBER and NAME, and then CHECK each box for the
groups that the person was a member of. Then when they submitted
the form, the person was entered into the PERSONS table via an
insert query, and an entry for each group that was checked was
entered in the PERSONS_GROUPS table via separate input queries.
The nice thing about this dynamicly built data entry form was that
as new groups were entered in the database, there was no need to
change the data entry form.

I'd like to do the same thing with MS Access forms, but I'm not
sure how to do it. Could someone point me in the right direction
on this?


Perhaps I'm misinterpreting your message, but it sounds very simple:
use a multiselect listbox that lists the categories. It would be
populated by SQL from the table that holds the list of groups.

How you initiate the insert of the data into the intermediary join
table is up to you. I'm not certain how I'd choose to do it. Using
the listbox's AfterUpdate event has its pitfalls, and using a
command button to require the user to initiate it has it's pitfalse,
as well.

Another option, which is very easy in Access, is to use a subform
built on the join table, linked to the parent table (which is the
recordsource of the parent form), and have a combo box that lists
the category choices. To add a category, you add a new record to the
subform and choose a category from the dropdown list. It's not the
most intuitive UI, but once people have done it a couple of times,
they understand it perfectly well. But it's very easy to build.

Keep in mind that rich-client UIs are by definition going to be very
different from a web interface. The checkboxes approach is probably
appropriate for a browser-based app, but it's completely
inappropriate for an Access application. Access has far more UI
widgets than a browser, so you can choose more efficient and more
appropriate controls for implementing your UI.

I have the exact opposite problem when I'm doing web pages -- I
can't figure out how to translate the type of UI I'd build in Access
into a proper web-based UI.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Dec 26 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Petri Savolainen | last post by:
After reading the manuals and googling around a bit, I thought I'd use the 'compile' built-in to create a code object. Then, using either new.function() or types.FunctionType(), create a function...
1
by: Alex Elbert | last post by:
Hi I have built dynamic HTMLTable. Now I want to attach it directly to the Email Body - it is already built, so why not to use a ready table. However, I cannot find the way of getting plain HTML...
1
by: ezmeralda | last post by:
Hello, I have to solve the following task: - create an editor-application in c# to read, modify and create xml-files - .xsd-schema-file is available and can be used Currently, I am thinking...
0
by: Billy | last post by:
I have a web page with a control (Control#A) on it. The control (#A) has a control (Control#B) on it which displays an exception message when set and displayed. I am creating a simple datagrid...
7
by: pmclinn | last post by:
I was wondering if it is possible to dynamically create a structure. Something like this: public sub main sql = "Select Col1, Col2 from Table a" dim al as new arraylist al =...
2
by: John Oliver | last post by:
Fedora Core 2, httpd-2.0.54-10.2, php-4.3.10-2.4, postgresql-7.4.7-3.FC2.1 Using a test.php that includes: <?php pg_connect("host=localhost dbname=db_name user=user password=password$");...
2
by: mike | last post by:
i'm building an desktop windows app in C#. the main menu for the application will be different depending on the admin rights of the user. i've built the entire app. in delphi and i simply activated...
4
by: sirjohnofthewest | last post by:
If I possessed the power to sway the mind of every user in the world to delete all forms of Internet Explorer I would die a happy man. Hi guys, I frequently visit this site to get answers to my...
18
by: Angus | last post by:
Hello We have a lot of C++ code. And we need to now create a library which can be used from C and C++. Given that we have a lot of C++ code using classes how can we 'hide' the fact that it is...
11
by: =?Utf-8?B?UGV0ZXIgSw==?= | last post by:
I am working with Visual Studio or alternately with Expression Web. I need to create about 50 aspx pages with about 1200 thumbnali images, typically arranged in three to four groups per page,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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.