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

Multiple Record Sources for a form

10
I was wondering if it is possible to have multiple record sources for a form without creating queries, and if so how do I go about doing that.
Thanks
Dec 27 '11 #1

✓ answered by Seth Schrock

You can do it without creating a query object that would appear in the object list, however it would still be a query supporting the form. You would do this by typing the SQL code into the row source property of the form.

Why don't you want to use a query?

5 11190
Seth Schrock
2,965 Expert 2GB
You can do it without creating a query object that would appear in the object list, however it would still be a query supporting the form. You would do this by typing the SQL code into the row source property of the form.

Why don't you want to use a query?
Dec 27 '11 #2
NeoPa
32,556 Expert Mod 16PB
You can do that (as in you can change the record source on the fly), but most people who have such an interest are just looking for the concept of filtering (See Example Filtering on a Form) without knowing it.
Dec 28 '11 #3
sierra7
446 Expert 256MB
Hi rwest,
you must give us more information about what you want to achieve.

What immediately comes to (my) mind is the use of sub-forms. The main form could be base on the table tblSalesOrders while the Customer details could be based on the tblCustomers table; Sales Order details on the tblSalesOrderDetails table etc. Is that the sort of thing you are thinking of?

To achieve this you start by building separate forms for each table then embed one form within the other. (there is a tool on the tool-bar to add a sub-form/sub-report controls.)

Having said that, you should get into the habit of basing you forms on queries not tables.
S7
Dec 28 '11 #4
rwest
10
Would you have an example of the SQL code? The main form's record source is from a table called customers and I want the sub form's record source to be from the tables orders and types. I have a connection between customers and orders, and between orders and types but not between customers and orders. This is why I want 2 record sources for the subform of orders and types. If there is another way I can do this that would be great too.
Dec 28 '11 #5
Seth Schrock
2,965 Expert 2GB
If you don't know SQL code, your best bet is to create a query in design view (it is much easier this way for new people). Just include the Customers, Types, and Orders tables and then select the fields that you want out of each. The query will view the relationship and be able to pull the related records and put them together. You can then base the form on that query. The query does the work of combining muliple tables for the form.

I don't have enough information to even guess at what the SQL code that you would need. The basic form of SQL code is:
Expand|Select|Wrap|Line Numbers
  1. SELECT ___
  2. FROM___
  3. WHERE ___ (optional)
The following website will help you learn SQL if you want. SQL tutorial

If you really don't want to have a query object as the source (I can't think why), then take the query that you created in the instructions above and then change to SQL view, copy the code and then paste it into the row source of the form.
Dec 28 '11 #6

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

Similar topics

5
by: R Duncan | last post by:
Hi, I'm considering moving a payroll application out of Microsoft Access to some web-based solution. It is getting way to big for Access and the system is growing unstable, so I'm learning PHP...
0
by: Shailesh Ratadia | last post by:
The answer to this will largely depend on your source(s). Are these all databases? One approach would be to build a webservice layer which has specific methods to get data from each source and...
9
by: David Allison | last post by:
cmdButton to Print 3 copies of record in Form view ? cmdButton will print 1 but I need 3 copies of the one Form record. -- Dave Allison
3
by: Steven Stewart | last post by:
Hi there, I have posted about this before, but yet to arrive at a solution. I am going to try to explain this better. I have an Employees table and a Datarecords table (one-to-many...
0
by: Arnold | last post by:
Hi there, I have a form to organize bottles in mind, but am unsure if it will work. Here's some background info: Mainform = frmProduct, which contains fields for pricing, status, etc. of...
8
by: Ragbrai | last post by:
Howdy all, I have a form for entering data (Form A), on which is a cmd button that opens Form B in acdialog mode to allow me to enter/edit records that are being displayed on Form A. After...
1
by: BarkersIT | last post by:
Hello, i'm pretty inexperienced with Access so this may be obvious to someone. I hope it is. I have been writing a database at work, I started with a few tables and then used the form wizard to...
2
by: Tom Clavel | last post by:
Scratching my head. I am using the filter property on a combo box .AfterUpdate event to get to a single client record. This is causing a some strange behavior: As I enter a subform, I get a no...
0
by: jessejames | last post by:
I need to update multiple record in my table(in PostgreSQL dbase).. here is my sample data user_id user_name display_name email_address 1 user1 BPI ...
1
by: chocciies | last post by:
Hi! I want to delete multiple record via checkboxes. However, with no success. Is there sthg wrong with the value of my checkbox? Your help will be greatly appreciated. Thanks! <form...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
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: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.