A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

command button to display specific data



 
 
Thread Tools Display Modes
  #1  
Old April 10th, 2010, 10:57 PM posted to microsoft.public.access.forms
desireemm
external usenet poster
 
Posts: 21
Default command button to display specific data

Hi everyone I have a question, when I go to insert a command button I use the
wizard to open a form to find specific data to display. Now on th form I put
the button contains the data for the parent, the form to link it to the
child. So if the parent has several children then you can look up the parent
the hit the command button that says child and theres all the kids by that
parent. this is based off a familyId which was put in place by the original
person who created the database. now when I go into design form and press the
button I get an error message saying "invalid column name acostajennifer",
the primary key consist of firstname and last name together. So if a
participants name is John Doe then doejohn is the primary key (I would rather
use a numbering system for this), what I'm wondering is would this work if I
replaced the primary key with a numbering system instead. the last database I
created was able to do this successfully but I used a numbering system not
just lettering, so I'm wondering if thats the issue?


if I could get some insight please
thanks
  #2  
Old April 10th, 2010, 11:55 PM posted to microsoft.public.access.forms
John W. Vinson
external usenet poster
 
Posts: 18,261
Default command button to display specific data

On Sat, 10 Apr 2010 14:57:01 -0700, desireemm
wrote:

Hi everyone I have a question, when I go to insert a command button I use the
wizard to open a form to find specific data to display. Now on th form I put
the button contains the data for the parent, the form to link it to the
child. So if the parent has several children then you can look up the parent
the hit the command button that says child and theres all the kids by that
parent. this is based off a familyId which was put in place by the original
person who created the database. now when I go into design form and press the
button I get an error message saying "invalid column name acostajennifer",
the primary key consist of firstname and last name together. So if a
participants name is John Doe then doejohn is the primary key (I would rather
use a numbering system for this), what I'm wondering is would this work if I
replaced the primary key with a numbering system instead. the last database I
created was able to do this successfully but I used a numbering system not
just lettering, so I'm wondering if thats the issue?


if I could get some insight please
thanks


Please post your code. We can't debug what we can't see!

You're absolutely correct about using a number rather than a name as a primary
key. A primary key must be unique, and should be stable (not changing over
time) and short (not taking up too much space and search time) - a person's
name fails on all three counts.

Perhaps you could post the current structure of your tables and someone can
advise on how to improve it. You might also want to look at some of these
resources:

Jeff Conrad's resources page:
http://www.accessmvp.com/JConrad/acc...resources.html

The Access Web resources page:
http://www.mvps.org/access/resources/index.html

Roger Carlson's tutorials, samples and tips:
http://www.rogersaccesslibrary.com/

A free tutorial written by Crystal:
http://allenbrowne.com/casu-22.html

A video how-to series by Crystal:
http://www.YouTube.com/user/LearnAccessByCrystal

MVP Allen Browne's tutorials:
http://allenbrowne.com/links.html#Tutorials

--

John W. Vinson [MVP]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:41 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.