?
Solved

I need assistance with a grid or datasheet in Access 2013

Posted on 2014-12-14
2
Medium Priority
?
567 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month12 days, 13 hours left to enroll

777 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