473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Creating a form based on a querry

Hello,

I am working on a many to many database for tracking staff training hours. I believe I have the tables set up correctly, but now I am having trouble with the forms. I want to create two separate forms. One is a basic form (that I can do) to initially enter the basic staff info (name, start date, end date, initial licensures) Then I need a form to enter the trainings. What I envision is a simple form for the training title, trainor, and ceu hours with a nested form for entering which staff members attended and the date of the training.

The issue I am having is that the people entering the data need to be able to enter the staff members by name rather than the staff ID (which is my primary key that is used in the staff2training table.

So how do I set the form to have the drop down of staff names for entry that will then populate the appropriate staff ID so that the link is made.

Laura
Oct 31 '14 #1
1 836
twinnyfo
3,653 Expert Mod 2GB
Hi Laura,

This is relatively simple.

If your Training Table is properly structured, all you need is a field for the Staff Member (plus any additional fields relative to the training). This field will just need to be the same data type as the Staff ID (which is probably a long integer or an AutoNumber?) Either way, on your subform for the training, create a combo box that has two columns. The first column can be hidden and that will hold the Staff ID. The second column is the Staff member name.

Your Row Source will be something like this:

Expand|Select|Wrap|Line Numbers
  1. SELECT StaffID, StaffMemberName 
  2. FROM tblStaffMembers;
Make sure that the bound column of the combo box is the staff ID. This combo box should be bound to your training table, particularly to the StaffID Field.

Hope this makes sense and hope it hepps!

Let us know if you are confused.
Oct 31 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jason | last post by:
I am trying to filter records in a primary form based on records in related tables. The data in the related tables is being displayed in the primary form through subforms. To be more specific, I...
0
by: Mike | last post by:
I have a form that has a search button on it. The form has three text boxes, last name, first name, and bidder number. I put in a last name and click the search button. Clicking the search button...
0
by: Mike Kingscott | last post by:
Hi there, Getting into ASP.Net finally, looks good but I'm having a bit of trouble here. I'm protecting my web site via form-based security (I won't go into the ins and outs, suffice to say it's...
2
by: Stephen Zachmann | last post by:
Ok, I want to have a directory full of pdf files and a page that creates links to them dynamically so that if I add 10 docs or subtract 7 or whatever, they will be added or removed the next time...
13
by: david | last post by:
I can not figure out what is the problem that I can protect ASP.NEt form resource but not some other type of files, for example, images. All my aspx forms located in Demo folder and image files...
4
by: Deus402 | last post by:
Here is my table design: tblEmployers EmployerID autonum (primary key) EmployerName text tblLocations LocationID autonum (primary key) EmployerID longint (foreign key) LocationAdress text
2
by: Sanjaylml | last post by:
I have made a form in Access 2000. In addition to just simply enter the data through form, I have appended sub-form in main form to show the all the entered records as Sub-Form (DataSheet), which is...
1
by: MikeMikerson | last post by:
Hello, I am need to create a subform (no problem) of a form based query (a problem). I need a form that will prompt the user to enter in a name, and the form will then display a query of the...
5
by: caconklin | last post by:
Access 2003, Windows XP. Currently I am able to open a form - case form - based upon information input by the user in another form - search form. I would like to be able to open the case form...
15
by: jt196 | last post by:
I'm trying to create an editable form of fulfilled orders on my system and am running into problems with creating a form based on this query. The field that I need to update (invoice number) is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.