473,387 Members | 1,578 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,387 software developers and data experts.

How do I create a form that can search using a certain field in a table, and present

I have an examination scenario where I already have all the other details of the candidate. I have reached a point where I want to start entering their examination scores. I am trying to develop a form that will perhaps search using "exam no." and present the various subject fields for me to enter the candidates scores, and the form will keep doing this until I demand to exit.

PLEASE MAKE ME HAPPY
Oct 22 '14 #1
1 755
Seth Schrock
2,965 Expert 2GB
This is actually not very hard to do. I'll tell you what I think is the simplest method. You would have two forms (frmSearch and frmResults) and a query. In frmSearch you would have a textbox called txtValue. Your query would have all the fields that you want to see in frmResults as well as the [Exam No] field. frmResults would be bound to this query. In the query's WHERE clause, you would put
Expand|Select|Wrap|Line Numbers
  1. 'If [Exam No] is a number field
  2. WHERE [Exam No] = Forms!frmSearch!txtValue
  3.  
  4. 'If [Exam No] is text
  5. WHERE [Exam No] = "'" & Forms!frmSearch!txtValue & "'"
Now in frmSearch, place a button that opens frmResults and then closes frmSearch.
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OpenForm FormName:="frmResults"
  2. DoCmd.Close acForm, Me.Name
Oct 22 '14 #2

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

Similar topics

1
by: Average Bear | last post by:
If anyone could help with this one, I am a bit puzzled. I understand you can create an index using two fields of a database, then use the seek method to find a record based on both fields. My...
2
by: sfriedman | last post by:
I was able to successfully link my Outlook Contacts table to an Access Database and create an entry form. Unfortunately the Displayname field which is one of the key fields for how the contact is...
4
by: Steven | last post by:
Hi, I have a database table field to store the form name, I want to create the particular windows form by using the value that read from that DB field. For examples, the table field has a value...
0
by: kalyanakrishna | last post by:
I am not able to create a trigger on Text field table Comments will be appriciatable.
2
by: lhsiber | last post by:
I am new to access and am having a problem with filtering. Here is a little bit of my setup: I have a main form that has a listbox so that users can choose one or many groups in which to display...
1
by: mbilalk | last post by:
I have two tables in database. 1. Person 2. Doctor I want to create a form in access which containsPerson information as well as its doctor information. In order to view it simple but i want to...
7
by: chrismaliszewski | last post by:
Hi. I created code which makes dynamically form with bounded controls for all columns. I show it to you below. My problem is, how I have to change this code to create form which record source...
6
by: mercout | last post by:
Hey, I've been trying to create a search form in access for a while now, searching through books and emails. I have the search form set up with 11 combo box's, 3 text box's, a view button, and a...
1
by: LinkedTableMan | last post by:
I'm trying to use the FIND command to search for a specific value in whatever field I focus on. I'm using MS Access 2007. The table the form is using is linked to SQLServer someplace on the...
1
by: balom2013 | last post by:
Hello I would like to create a search form for my database that searches by: Customer ID Firstname Lastname What I would like is to have a text box on my startup form where you can enter the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.