Solved

I need assistance with a grid or datasheet in Access 2013

Posted on 2014-12-14
2
513 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

785 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