473,499 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a form based on a querry

1 New Member
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 839
twinnyfo
3,653 Recognized Expert Moderator Specialist
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
11082
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
1400
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
3520
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
1093
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
1665
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
2339
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
2287
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
1597
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
2920
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
4399
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
7128
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7006
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7215
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6892
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5467
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4917
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4597
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3096
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1425
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.