command button to display specific data

  • Thread starter Thread starter desireemm
  • Start date Start date
D

desireemm

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
 
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/accessjunkie/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
 
Back
Top