473,499 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying and modifying 1:N data in forms?

Hi All,

I am relatively new to MS Access but am wel suited in general
relational databases. I seem to be unable to accomplish the displaying
of query results that return more then one line item.
I want to create a person record that can have multiple addresses, and
I want all these addresses displayed on a form for manipulation, but I
want to prevent saving the fields to the database as street1, street2,
zipcode1, zipcode2, state1, state2 etc etc for any numbers of addresses
(between 0 and 6 or so) that can be added to this person record.

I have the database tables setup with all the neccesary relations to
the other tables, that was the easy part for me. I have also already
come up with the neccesary queries to pull up the data. Now all I need
is to know how I can do this in the form world of ms access.

Help would be appreciated,
Stephan

Nov 13 '05 #1
6 1763
create a single form for 'person'
create a continuous form for 'personAddress'
drag the continuous form onto the single person to create a subform
link the form and subform by the 'person' field

Nov 13 '05 #2
Great! Thanks, this was the pointer I needed.
Is there a property I can set that will remove the line that divides
the individual records? I have changed the height of the continuous
subform so it is as close to 'one line' as possible, but access still
appends a line at the end of each record.

Stephan

Nov 13 '05 #3
The "many" side of your applications is going to be handled by what we call
a sub-form.

You can read about them here:
http://www.members.shaw.ca/AlbertKal...000000005.html

So, you "main" form (you can create it with a wizard) will have the persons
name, perhaps who entered the name, and general information that you want to
keep about this person.

Then, you need to build a sub-form based on the related "address" table.
(again, you can create this form with a wizard). (you crate one form, and
then save it).

Now, just bring back up the main from in design mode, and use the wizard to
insert the sub-form. You are done. This whole process takes no code, and
ms-access will manage the "one" to many for you...
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
http://www.members.shaw.ca/AlbertKallal
Nov 13 '05 #4
not sure what you mean by a line ?
is it possible that there is a 'line' control on the form ?

Nov 13 '05 #5
Don't worry about the line. It were form deviding lines, controlled by
a boolean that I found and set to false.

I have one more thing I need to figure out, perhaps someone can help me
with this too. I have a subform with several TextBoxes that hold dates.
I want a
calender to become visible when users dblclick on it, and be able to
pick a date etc etc. I have all of this working in a test form I
created, but my real form situation is a little different:

I don't have space on my subform to create the calender, so I placed
the calendar
on the main (parent) form. I was able to control the calender's
properties from
the sub form by using Parent.Calender.Visible=True etc, but how can I
do the reverse?
How can I modify the TextBoxes in my subform based on a date I select
on the Calendar (on the parent form) so I can do something like:
subForm.TextBox.Value = Calendar.Value

Thanks,
Stephan

Reply

Nov 13 '05 #6
st********************@gmail.com wrote in
news:11**********************@o13g2000cwo.googlegr oups.com:
Don't worry about the line. It were form deviding lines,
controlled by a boolean that I found and set to false.

I have one more thing I need to figure out, perhaps someone
can help me with this too. I have a subform with several
TextBoxes that hold dates. I want a
calender to become visible when users dblclick on it, and be
able to pick a date etc etc. I have all of this working in a
test form I created, but my real form situation is a little
different:

I don't have space on my subform to create the calender, so I
placed the calendar
on the main (parent) form. I was able to control the
calender's properties from
the sub form by using Parent.Calender.Visible=True etc, but
how can I do the reverse?
How can I modify the TextBoxes in my subform based on a date I
select on the Calendar (on the parent form) so I can do
something like: subForm.TextBox.Value = Calendar.Value

Thanks,
Stephan

Reply

see http://www.mvps.org/access/forms/frm0057.htm or just
download the application
databasehttp://www.mvps.org/access/downloads/datepicker.zip

It is a popup calendar. I suppose you could embed it into your
form, but It's just wonderful on continuous forms as it is.

--
Bob Quintal

PA is y I've altered my email address.
Nov 13 '05 #7

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

Similar topics

2
1357
by: Rose | last post by:
Hi all, I'm a newbie to C# and .NET, so please be gentle! My limited background is in VBScript,ASP, and Access dbs. I need to retrieve data from a SQL server db (8.0) to be displayed in a...
0
3111
by: Dave Elliott | last post by:
After inserting a new data row to a DataTable that is bound to a datagrid, I am unable to change data in a row that is after the newly added row without getting bizarre results. I have added the...
5
2198
by: Robert | last post by:
Hello Accessors I have some reports created in Access that are very good for what they do. However, it seems to me that when you are displaying information you don't need to print out that a...
1
3614
by: Novice | last post by:
I'm afraid I will incur the wraith of Mr. Powell on this one - but I did read his #1 FAQ and some others and I still can't figure this out. I created this little c# app. and I have a PictureBox...
3
4886
by: vinayak | last post by:
Hi I am displaying data in Datagrid in ASP.NET with Edit/Update functionality for each row. On the same page I have 2 Button controls which submits the request to server. These button controls...
2
4312
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control...
19
2796
by: Melvin G. Sheppers | last post by:
I want to display the time in a particular timezone (US Central) regardless where the computer is located. I have written the script below which displays the time in the Eastern, Central, Mountain,...
13
2864
by: David W. Fenton | last post by:
I've been struggling the last two days with something I thought was very easy, which is to open a web page with a form on it and populate the form with data passed in a query string (either POST or...
1
1257
by: =?Utf-8?B?SmFjaw==?= | last post by:
Hi, I have a simple code where I am trying to capture a recordset in a grid veiw using a button click event. Data is connected to sql server 2000. However, I am getting error at the line...
0
7009
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7178
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
7223
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...
1
6899
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...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3103
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3094
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.