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 » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Command button question



 
 
Thread Tools Display Modes
  #1  
Old June 14th, 2007, 03:30 AM posted to microsoft.public.access
weatherbunny7
external usenet poster
 
Posts: 1
Default Command button question

Being fairly new to Access, I'm dreaming too big for what I can accomplish on
my own.

I'm wondering if there's any way to add a command button (or something) to a
form so that, when clicked, it would add another field to the form.

For example, I'm making this database for our Student Conduct system, and a
person may receive more than one type of probation or counseling as a
sanction, and instead of having blanks for everyone who doesn't get several
types, is there a way where, after entering "general probation" in the
probation field that I could have a button/link to click that would add
another probation drop-down so that I could choose another type of probation?

(If that makes sense. )

Thanks!!
  #2  
Old June 14th, 2007, 04:04 AM posted to microsoft.public.access
Allen Browne
external usenet poster
 
Posts: 11,706
Default Command button question

If one incident can involve multiple types of probation, you don't need
another field: you need a related table.

Consider these 3 tables:

Incident table (one record for each incident):
IncidentID AutoNumber primary key
StudentID relates to Student.StudentID
IncidentDate Date/Time
Descrip Memo

Probation table (one record for each type of probation):
ProbationID AutoNumber primary key
Probation Text unique name for this type of
probation.

IncidentProbation table:
IncidentID relates to Incident.IncidentID
ProbationID relates to Probation.ProbationID

So if incident 97 involves 3 types of probation, the table would have 3
records like this:
IncidentID ProbationID
97 1
97 4
97 7

Your Incident form would have a continuous subform bound to the
IncidentProbation table. You add an extra row to the subform for each type
of probation that applies. The combo in the subform where you select the
type of probation will have the Probation table as its RowSource.

Technically, the 3rd table is called a junction table, and this is the
standard way of resolving a many-to-many relation into a pair of one-to-many
relations. For another example, see:
Relationships between Tables (School Grades example)
at:
http://allenbrowne.com/casu-06.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"weatherbunny7" wrote in message
...
Being fairly new to Access, I'm dreaming too big for what I can accomplish
on
my own.

I'm wondering if there's any way to add a command button (or something) to
a
form so that, when clicked, it would add another field to the form.

For example, I'm making this database for our Student Conduct system, and
a
person may receive more than one type of probation or counseling as a
sanction, and instead of having blanks for everyone who doesn't get
several
types, is there a way where, after entering "general probation" in the
probation field that I could have a button/link to click that would add
another probation drop-down so that I could choose another type of
probation?

(If that makes sense. )

Thanks!!


 




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 09:39 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.