Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I need assistance with a grid or datasheet in Access 2013

Posted on 2014-12-14
2
Medium Priority
?
600 Views
Last Modified: 2014-12-21
Hi Experts,
I have an ACCESS 2013 application. The application has a one to many relationship between the Job table (tblJob) and JobVenues table (tblJobVenues).

tblJob has the following fields:
JobID  (Primary Key - Auto Generate)
JobName
COntactName
ContactPhone
ContactEmail

tblJobVenues has the following fields:
JobVenueID (Primary Key - Auto Generate)
JobID (Foreign Key that links it to tblJob)
VenueName
Address1
Address2
City
State
Zip

I want my form to display the Job information, with it's related venues in a some sort of grid.
How do I do this?  Do I use a sub form, a form in Datasheet View, or something else?

I have attached a sample of what I want to accomplish to this post.  Thanks in advance.
Sample of grid
I tried the following code and it failed:
Subform Error
mrotor
0
Comment
Question by:mainrotor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 40500031
1. Create a Form based on tblJob.
2. Create a second Form based on tblJobVenues. That form should be a Datasheet form.
3. With the first form open in Design view, drag the second form and drop it on the first form. This will create your subform.
4. On the first form, set the Master and Child link fields to be JobID for both.

Don't add code to set the Recordsource, or anything of that nature. Access will handle the relationships via the Master and Child link process.

Regarding your error: That generally means you are not correctly referring to the Subform. Note that Access names that object differently depending on how you add the Subform.
0
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 40500387
It is a good idea to give controls meaningful names, using the standard LNC (Leszynski Naming Convention) prefixes, to avoid confusion when reading code.  This convention is given in many books, and in my Wikipedia article on this topic:

http://en.wikipedia.org/wiki/Leszynski_naming_convention
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

609 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question