PC Review


Reply
Thread Tools Rate Thread

command button to display specific data

 
 
desireemm
Guest
Posts: n/a
 
      10th Apr 2010
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
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      10th Apr 2010
On Sat, 10 Apr 2010 14:57:01 -0700, desireemm
<(E-Mail Removed)> 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]
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find data in field after a specific character & display specific d Steve Microsoft Access Queries 2 2nd Jun 2009 12:59 PM
Access 2007 Command button to open form and find specific data JoeP Microsoft Access Forms 0 25th Feb 2009 05:56 PM
Add several new records with specific data with command button rocketD Microsoft Access 5 7th Jan 2009 04:19 AM
specific users/command button =?Utf-8?B?RGFuIEBCQ0JT?= Microsoft Access Form Coding 4 20th Mar 2006 08:30 PM
Command Button to Open Form and display specific records QS Microsoft Access Getting Started 1 21st Jul 2003 11:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:46 PM.