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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|