Hello everyone.
I have Access 2000 database which holds student records in the school.It stores subject grades for each student.In the 'Student Grade Form', I would like to search student surname using a query rather than scrolling down through 100s of names.Also, I would like the results of the query search to show in the form automatically in fields of 'Student name' and 'Student surname' based on the results.Is there any way I can do this?Should I create a subform?
So far, I have created a query to find student name in a another form called 'Student Form', where query results show in a new form called: 'Query for form'.On this form,I have a button to go back to the 'Student Form'.
Thanks guys for your time and help.
Below, VBA code for three forms: Form_Student grade - Option Compare Database
-
-
Private Sub Command14_Click()
-
On Error GoTo Err_Command14_Click
-
-
-
DoCmd.GoToRecord , , acPrevious
-
-
Exit_Command14_Click:
-
Exit Sub
-
-
Err_Command14_Click:
-
MsgBox Err.Description
-
Resume Exit_Command14_Click
-
-
End Sub
-
Private Sub Command15_Click()
-
On Error GoTo Err_Command15_Click
-
-
-
DoCmd.GoToRecord , , acNext
-
-
Exit_Command15_Click:
-
Exit Sub
-
-
Err_Command15_Click:
-
MsgBox Err.Description
-
Resume Exit_Command15_Click
-
-
End Sub
-
Private Sub Command16_Click()
-
On Error GoTo Err_Command16_Click
-
-
-
DoCmd.GoToRecord , , acNewRec
-
-
Exit_Command16_Click:
-
Exit Sub
-
-
Err_Command16_Click:
-
MsgBox Err.Description
-
Resume Exit_Command16_Click
-
-
End Sub
-
Private Sub Command17_Click()
-
On Error GoTo Err_Command17_Click
-
-
-
DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70
-
DoCmd.DoMenuItem acFormBar, acEditMenu, 6, , acMenuVer70
-
-
Exit_Command17_Click:
-
Exit Sub
-
-
Err_Command17_Click:
-
MsgBox Err.Description
-
Resume Exit_Command17_Click
-
-
End Sub
-
Private Sub Command18_Click()
-
On Error GoTo Err_Command18_Click
-
-
-
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
-
-
Exit_Command18_Click:
-
Exit Sub
-
-
Err_Command18_Click:
-
MsgBox Err.Description
-
Resume Exit_Command18_Click
-
-
End Sub
-
Form_Student - Option Compare Database
-
-
Private Sub Command18_Click()
-
On Error GoTo Err_Command18_Click
-
-
-
DoCmd.GoToRecord , , acNext
-
-
Exit_Command18_Click:
-
Exit Sub
-
-
Err_Command18_Click:
-
MsgBox Err.Description
-
Resume Exit_Command18_Click
-
-
End Sub
-
Private Sub Command19_Click()
-
On Error GoTo Err_Command19_Click
-
-
-
DoCmd.GoToRecord , , acPrevious
-
-
Exit_Command19_Click:
-
Exit Sub
-
-
Err_Command19_Click:
-
MsgBox Err.Description
-
Resume Exit_Command19_Click
-
-
End Sub
-
Private Sub Command20_Click()
-
On Error GoTo Err_Command20_Click
-
-
-
DoCmd.GoToRecord , , acNewRec
-
-
Exit_Command20_Click:
-
Exit Sub
-
-
Err_Command20_Click:
-
MsgBox Err.Description
-
Resume Exit_Command20_Click
-
-
End Sub
-
Private Sub Command21_Click()
-
On Error GoTo Err_Command21_Click
-
-
-
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
-
-
Exit_Command21_Click:
-
Exit Sub
-
-
Err_Command21_Click:
-
MsgBox Err.Description
-
Resume Exit_Command21_Click
-
-
End Sub
-
Private Sub Command31_Click()
-
On Error GoTo Err_Command31_Click
-
-
Dim stDocName As String
-
-
stDocName = "Search by student surname"
-
DoCmd.OpenQuery stDocName, acNormal, acEdit
-
-
Exit_Command31_Click:
-
Exit Sub
-
-
Err_Command31_Click:
-
MsgBox Err.Description
-
Resume Exit_Command31_Click
-
-
End Sub
-
Private Sub Command33_Click()
-
On Error GoTo Err_Command33_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Query for form"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_Command33_Click:
-
Exit Sub
-
-
Err_Command33_Click:
-
MsgBox Err.Description
-
Resume Exit_Command33_Click
-
-
End Sub
-
Private Sub Command34_Click()
-
On Error GoTo Err_Command34_Click
-
-
-
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 2, , acMenuVer70
-
-
Exit_Command34_Click:
-
Exit Sub
-
-
Err_Command34_Click:
-
MsgBox Err.Description
-
Resume Exit_Command34_Click
-
-
End Sub
-
Form_Query for form - Option Compare Database
-
-
Private Sub Command19_Click()
-
On Error GoTo Err_Command19_Click
-
-
Dim stDocName As String
-
Dim stLinkCriteria As String
-
-
stDocName = "Student"
-
DoCmd.OpenForm stDocName, , , stLinkCriteria
-
-
Exit_Command19_Click:
-
Exit Sub
-
-
Err_Command19_Click:
-
MsgBox Err.Description
-
Resume Exit_Command19_Click
-
-
End Sub
1 2832 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: thomas goodwin |
last post by:
I have a query which asks for a parameter value to execute it.
To see the results I have to:
a) click on the query -- the "Enter Parameter Value" window pops up.
b) enter the parameter value
c) look at results in datasheet view
If I want to run the query again, I must
d) click to close the datasheet view
e) click on the query
f) enter the parameter value
|
by: auron |
last post by:
Hi there,
I have a really stupid and banal problem with showing the results of a
MySQL query in PHP, preciselly with MySQL count() function that gives
to a variable in PHP the result.
NOTE:
The problem here is PHP not MySQL, in MySQL everything works just
fine.
Here is the query that I wrote for getting the number of how much
|
by: Timbo |
last post by:
Hi there,
I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2.
My first table is a table containing all the Tickets I got. The field ”Ticket” is simply a ticket-number.
I’ve made a form in which I am to choose an existing Ticket and write a description for it pluss other things. The description to these Tickets are stored in another table called ”LogBook”. I then made a query on all of...
|
by: sesling |
last post by:
I have created a query that will pull information from our database for the operators. This query will pull in on average 50,000 records. The operators need to refine the search results. I have used the following in the criteria section of the query for the operators to refine the search . However, the operators do not always remember how the clients name appears in the DB and we get several failed queries. To correct this, I created a form...
|
by: dac |
last post by:
I am quietly going insane on this project. I've never worked on a project like this one before. All my previous sticky forms were for data entry, not editing. I don't know how to display the form with data from the database, allow the user to update it, and then display the form again with POST data. I can get the data out of the database and get the user updates back into the database, but how do I get the filled-out form back to the user...
| |
by: tomlebold |
last post by:
Having problems displaying query results from combo boxes on a sub
form, which is on the same form that is used to select criteria.
This has always worked form me when displaying query results on
another main and sub form.
The requery on the sub form and refresh comands on the main form do
not work when the form is first displayed and when the selection
criteria is changed.
Should I be doing a refresh and then repaint of the sub form.
...
|
by: underground |
last post by:
I have a problem that I've spent countless hours on and I'm more than certain this is a obviuos issue to an expert but I am still learning. I have a paging script that I have modified to display a certian amount of records per page. But when I click on the next link , no new result are displayed it keep displaying the same result. Here is a sample of the script
<?php include('hdb.html'); ?>
<?php
// Get the search variable from URL
...
|
by: bgreenspan |
last post by:
Hi Everyone, I'm back for some more expert help. Here's what I am
doing and what I tried.
My database has entries with Contract Names and Expiry Dates, among
other fields. I have a form designed to show the expiring contracts.
To do this I use a straight forward query in my form's ON LOAD code
strwhere = " BETWEEN #" & Now() & "# AND #" &
DateAdd("m", 6, Now()) & "#"
Set MyQueryDef = MyDatabase.CreateQueryDef("qryMattersQuery",...
|
by: terrencenr |
last post by:
I'm trying to post the results of a query on a form but the line I've put in bold is coming up. Now the query runs and the results are posted but displayed in the header of the box to insert my date this appears and not the option just saying rdate - Forms!A4Form!rdate
SELECT Reservation.ResDate, Passenger.PassFName, Passenger.PassLName, Passenger.PassAddr, Passenger.PassCont, Reservation.ResStatus, Cancellation.CanReason
FROM...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
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 we have to send another system
| |