Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access 2007: What is in a #Name?, or how to do I fix field references in my Access Database.

Posted on 2011-03-07
6
Medium Priority
?
689 Views
Last Modified: 2012-05-11
Hello, I am trying to create an Access 2007 database, but I keep running into trouble. Prior to the database I'm attaching to this question, I used simple structure of 1 table to 1 form so this was never an issue.  However, now when I have fields on a form coming from more than 1 table, I get an #Name? error in each field.  Could someone please look at the attached database and help me correct some of these issues on frmPtCharacteristics and frmGroup?  

Thanks for any advice and this would help me take a big first step on this project.

Thanks,
Bevo
EE-ABS-Example.accdb
0
Comment
Question by:Bevos
[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
  • 2
  • 2
6 Comments
 
LVL 10

Expert Comment

by:VTKegan
ID: 35060804
OK!... so when you design a form, you need to establish the Record Source for the form.  I  the Case of frmPTCharacteristics, you can set the recordsource of the form to tblPTCharacteristics, or you can create a query to use data from more than one table.  

Then when placing a control on the form like these text boxes and combo boxes, you need to set the control source property of the control to an available field from the list.  

If you have set up the Forms Record source correctly, then all of the needed controls will be available from the list.  See the image for what the control would look like.  

I set the Forms Recordsouce to tblPTCharacteristics, then set the control source to Call Number.

This is generally how to set up a bound form.


EE-Help1.JPG
0
 

Author Comment

by:Bevos
ID: 35060977
Thanks for the good advice VTKegan it was very helpful.  I fixed the frmPtCharacteristics, but when I am trying to edit frmGroup, now I just get a white space where the 'detail' section of that form should be.  For frmGroup I made a query which included the fields in tblGroup and tblMale which appeared together.  I then changed each of the form controls to correspond to this query as well as changing the form 'record source'.  Any ideas why this might happen?

Thanks you,
Bevo
0
 
LVL 3

Expert Comment

by:JAMcDo
ID: 35061014
Exactly as VTKegan says.  Each form has to have a Record Source - either a table or a query.

I only saw items from a single table when I looked at your forms.  In form  frmPtCharacteristics, I noticed only 1 unbound control.  Perhaps a DLookup or query could be used to get data for this form.

I have attached your database with bound forms for  frmPtCharacteristics and frmGroup as an example.

J.

 EE-ABS-Example.accdb
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 3

Accepted Solution

by:
JAMcDo earned 2000 total points
ID: 35061334
You may wish to try this for the control of the 'MalePer' which appears to be the only unbound control on the frmGroup form.

=DLookUp("[MalePer]","tblMale","[Call Number] = '" & [Call Number] & "' and [Group] = '" & [Group] & "'")

Not having any data in the tables nor knowing fully what you expect, I have made some assumptions as to your request.

J.
0
 
LVL 10

Expert Comment

by:VTKegan
ID: 35061385
It is not a good idea to use DLookup as suggested.  

This field should just be included as part of the recordsource of the form.   Using DLookups can slow down performance of the database and create a place for potential errors to occur on Null Values.  There are instances where DLookup can be quicker than creating a recordset to retrieve a value, but in this case it could be included as part of the query.
0
 

Author Comment

by:Bevos
ID: 35061412
So you suggest I copy this % male to the group table? Keep in mind that in some instances this will be a null value (the article does not give any information on gender).

Thanks, Bevo
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
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 …
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 …

715 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