473,670 Members | 2,569 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple subforms/sub datasheets

I've noticed that you can only have a sub datasheet pointing to one
table... is there anyway to change this? for example I have
Customer
|
---------- Customer/Product
|
----------- Customer Grp/Sales Grp
Now access wants customer/product and customer grp/sales grp to point
to the same table, is there any way to get each sub datasheet to point
do its own table?

I've noticed that forms act the same way when trying to have multiple
subforms within a subform...someo ne please help :(

Nov 13 '05 #1
5 5662
Create each form separately then drag and drop the two subforms onto the
main form. Set the Parent/Child link fields. Each subform should have its
own Record Source.

--
Wayne Morgan
MS Access MVP
"Beacher" <be*****@gmail. com> wrote in message
news:11******** **************@ g44g2000cwa.goo glegroups.com.. .
I've noticed that you can only have a sub datasheet pointing to one
table... is there anyway to change this? for example I have
Customer
|
---------- Customer/Product
|
----------- Customer Grp/Sales Grp
Now access wants customer/product and customer grp/sales grp to point
to the same table, is there any way to get each sub datasheet to point
do its own table?

I've noticed that forms act the same way when trying to have multiple
subforms within a subform...someo ne please help :(

Nov 13 '05 #2
I tried but it didnt seem to work.. ill be a bit more clear as well.. I
have a main form... and then a subform in this form I have 3 fields

field 1
field 2
field 3

now each of these fields have to point to a different table, but
dragging and dropping.. they all point to the same table

Nov 13 '05 #3
Ok, that's a different scenario. To get fields from 3 tables in a form you
have a couple of options. 1) Base the form on a query instead of a table.
Include the needed tables and fields in the query. If the query gets too
complicated and isn't updateable, then you won't be able to edit or add
records in the form. 2) Use DLookup() or other functions and make the
controls calculated controls. These controls won't be editable by the user.

--
Wayne Morgan
MS Access MVP
"Beacher" <be*****@gmail. com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
I tried but it didnt seem to work.. ill be a bit more clear as well.. I
have a main form... and then a subform in this form I have 3 fields

field 1
field 2
field 3

now each of these fields have to point to a different table, but
dragging and dropping.. they all point to the same table

Nov 13 '05 #4
Thank you very much :)

I never have used DLookup() before...infact I haven't done much in
vba.. but I looked up the use for it.. does it somewhat act like a
query? Would I use the parent table and use the primary key field to
look up the specific number I need? and if so, how would I put the
results of the DLoopup() into a subform/Datasheet

DLookup("FieldN ame" , "TableName" , "Criteria = n")
Dloopup("CondID ","tblProduct_S ales","CondID = 1") Would show me all
results where the CondID field = 1 correct? if so, I need to display
the whole row not just the one field

Nov 13 '05 #5
Yes, DLookup() works somewhat like a query, but it only returns the first
result it finds, not all the matching records as a query does. It is usually
used with a unique value for the criteria so that there is only one value to
be found. To use it, it is probably easiest to make a "calculated control".
To do that, you place an equation in the control's Control Source instead of
a field.

Example:
=DLookup("CondI D", "tblProduct_Sal es", "CondID = 1")

Usually, you don't use the same field in the condition and the return field,
you know the value of this field already, you don't need to look it up. You
would return another field from the record that matches the condition.

If you are wanting to return multiple fields from the record, it may be
better to use a listbox with multiple columns. You could place a query in
the Row Source of the listbox. The query's criteria would limit the record
returned, but you could display all of the fields from the record.

What you described in your first message as wanting to do IS what a subform
does. The scenario you gave in your second message is slightly different
from this one. I don't fully follow what you're trying to do.

--
Wayne Morgan
MS Access MVP
"Beacher" <be*****@gmail. com> wrote in message
news:11******** ************@g4 4g2000cwa.googl egroups.com...
Thank you very much :)

I never have used DLookup() before...infact I haven't done much in
vba.. but I looked up the use for it.. does it somewhat act like a
query? Would I use the parent table and use the primary key field to
look up the specific number I need? and if so, how would I put the
results of the DLoopup() into a subform/Datasheet

DLookup("FieldN ame" , "TableName" , "Criteria = n")
Dloopup("CondID ","tblProduct_S ales","CondID = 1") Would show me all
results where the CondID field = 1 correct? if so, I need to display
the whole row not just the one field

Nov 13 '05 #6

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

Similar topics

4
4038
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the user to complete before leaving the form or moving to the next record. So, in the BeforeUpdate event of the form itself I have the following code:
6
4342
by: ti33m | last post by:
Hi All, I'd like to include a datasheet on my user interface but since I'm starting to run tight on space, I'd like to have a vertically-oriented datasheet (column 1 has labels, column 2 has values), i.e. a transposed datasheet or datasheet in column format. A vertical datasheet will look cleaner, eliminate the need to scroll across (for miles) and lay out bit more efficiently since I have some long labels. It seems like Access only...
8
7693
by: deko | last post by:
How do I get the items selected from a datasheet? Does a datasheet support multiple selections? I know a ListBox has a "Selected" property that can be used when the MultiSelect property is set - but is there a way to get the same functionality with a datasheet? If not, I'm throwing all my datasheets in the junk..... why bother with datasheets? get all the same functionality with a listbox?
0
2696
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main form. Then I have 3 pages on a tab control ( 4 if the type of candidate validates that is is to be shown) Each page has a subform. The subforms can be either single or continuous, I think I am still deciding what I want to lock down this entry...
7
2323
by: lauren quantrell | last post by:
A while back I got a requirement for the client to be able to adjust the relative heights of two subforms by click-dragging the mouse and I came up with a kludge solution using a border control between the two subforms. But I put my mind to this again recently and came up with a solution (code below) that works well with multiple subforms to size both the heights and widths of the sunforms relative to each other, and it uses no additional...
11
4517
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my database,just help in getting me pointed in the right direction. I have a database with 8 tables, which from what I have read, cannot be linked on a single form, and be updatable. I have created a query which includes all 8 tables, and then...
4
4496
by: Dale Walker | last post by:
I've got a form that currently has a list box used to "find a record on my form" but the list in it is far too long and consists of fields of repeating data. Is there a way of creating a subform to do the same job that is in datasheet view with a collapsible subdatasheet? The main form is based on a table consisting of dates, events and venues (plus a lot of other guff not needed to explain this little problem). Each record has an ID,...
2
1814
by: Guy_Philly | last post by:
I am trying to add multiple subforms (or subtables?) on an existing form. The underlying table is a very detailed descriptive table for art in a collection. I am already using one subtable to manage the movement in and out of inventory. When I look at the table in the datasheet view, I see the "+" sign next to each record, and when I click on that, I see the subtable I already have setup - looking at that, it seems impossible to have...
31
6657
by: matthewslyman | last post by:
I have an unusual design and some very unusual issues with my code... I have forced Access to cooperate on everything except one issue - record deletion. My form design involves a recursively nested form. In other words, the form, m_settings_menueditor_recursive has a single subform; m_settings_menueditor_recursive (both are viewed as datasheets - so the form is its own subdatasheet.) The Form_Open event modifies the form's recordset so...
0
8466
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8896
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8810
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8590
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8659
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7410
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6211
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2035
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.