Solved

I need assistance with a grid or datasheet in Access 2013

Posted on 2014-12-14
2
504 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
2 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

758 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now