Mouse Scroll and Go To/Find

G

Guest

I've asked these questions in some of the other Access groups, but the
answers are over my head, I think I'm too much of a novice to understand the
person trying to help me.

My first issue is, I have a form named QC_Audit in a database named
QC_Tracker. In this form, I have a field called Loan_Number. What I would
like to do, is have the user enter a loan number into this field, click a
pair of binoculars next to the field - if the loan number already exists, it
will take them there, if not, they'll get a message of some sort - like "loan
number not found" or something like that. I have never actually written in
code, just expression builder - can anyone tell me how to do this via
expression builder?

Next, I am having the issue where the mouse wheel is scrolling through
records instead of moving the page up and down. I did see numerous other
posts regarding this and went to the Leban's site - but it too is over my
head, I don't understand what exactly I need to do??

Any help with either of these would be MUCH appreciated!!!!!!!!
 
A

Alex White MCDBA MCSE

Hi,

your first issue

on the click event of your 'binoculars' button

dim adoTest as new adodb.recordset
dim SQL as string
SQL = "Select * as Total from TblWhatever Where Loan_Number=" &
me.txtLoan_Number.value
with adoTest
.open SQL, currentproject.connection, adOpenKeyset, adLockOptimistic
if .recordcount > 0 then
me.recordsource = SQL
me.requery
else
msgbox "Loan number not found!"
end if
.close
end with

on your second issue

goto the properties for the form a find the cycle property and change it to
'Current Record' as the default is 'all records' this should stop the record
scrolling, if it does not post back here and I will try some other things
out.

Good luck...
 
A

Alex White MCDBA MCSE

Another thing the txtLoan_Number textbox should not be bound the the
underlying recordset.
 
G

Guest

Thanks for the help, but this is over my head, I don't know VBA, I was hoping
there was something I could do with Expression Builder? I did make the
change to the Current Record but it's still scrolling through the records.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top