Find and Go To

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following field:

Loan_Number

What I want to happen is that the user opens up the form. They type in
their loan number, lets say it's 12345. They click on a pair of binoculars
next to the loan number and a pop-up box or message box will appear telling
them that it's unable to find that loan number (because it doesn't exist) OR,
when they hit the binoculars it just takes them to loan number 12345 because
it turns out it's already in our database.

Can someone tell me EXACTLY how to do this?

My field name is Loan_Number, the name of my form is QC_Audit and the name
of the database is QC_Tracker.

I literally need step-by-step instructions. Rick, if you read this, you
tried to help me previously but then I was out for a while and now I'm
getting back at it.

Thanks to anyone who can help!!!!
 
NotIT,
I just used this response to a previous post. It does what you are
trying to do, but uses FindCustID as the search text control, and CustID as
the key field being searched... instead of Loan_Number.
Just look at the concept, and "translate" it to your situation.

Let's call the text control where you'll enter the CustID to look for
[FindCustID]

Private Sub FindCustID After_Update()
' After you enter a value to find
Dim Response as string, Prompt as String, Title as String
If IsNull("[CustID]", "tblCustomers", "CustID =
Forms!YourFormName!FindCustID" Then
' The CustID does not exist... offer user 2 choices...
Prompt = "This Customer ID does not exist. OK = Add new Cancel =
Retry another CustID"
Title = "CustID Not Found"
Response=MsgBox(Prompt, vbOKCancel, Title)
If Response = vbOK then
' Open a form if needed or just go to a New record
DoCmd.GoToRecord , , acNewRec
ElseIf Response = vbCancel Then
FindCustID = ""
Exit Sub
End If
Else
' The CustID exists... Do your normal CustID Find code here
End if
 
I appreciate the help, but you are over my head - is there something I can do
using expression builder to do this? I haven't written code before.
Thanks!!!

Al Camp said:
NotIT,
I just used this response to a previous post. It does what you are
trying to do, but uses FindCustID as the search text control, and CustID as
the key field being searched... instead of Loan_Number.
Just look at the concept, and "translate" it to your situation.

Let's call the text control where you'll enter the CustID to look for
[FindCustID]

Private Sub FindCustID After_Update()
' After you enter a value to find
Dim Response as string, Prompt as String, Title as String
If IsNull("[CustID]", "tblCustomers", "CustID =
Forms!YourFormName!FindCustID" Then
' The CustID does not exist... offer user 2 choices...
Prompt = "This Customer ID does not exist. OK = Add new Cancel =
Retry another CustID"
Title = "CustID Not Found"
Response=MsgBox(Prompt, vbOKCancel, Title)
If Response = vbOK then
' Open a form if needed or just go to a New record
DoCmd.GoToRecord , , acNewRec
ElseIf Response = vbCancel Then
FindCustID = ""
Exit Sub
End If
Else
' The CustID exists... Do your normal CustID Find code here
End if
---------------------------------------------------------------
Adjust to suit...
hth
Al Camp

NotIT said:
I have the following field:

Loan_Number

What I want to happen is that the user opens up the form. They type in
their loan number, lets say it's 12345. They click on a pair of
binoculars
next to the loan number and a pop-up box or message box will appear
telling
them that it's unable to find that loan number (because it doesn't exist)
OR,
when they hit the binoculars it just takes them to loan number 12345
because
it turns out it's already in our database.

Can someone tell me EXACTLY how to do this?

My field name is Loan_Number, the name of my form is QC_Audit and the name
of the database is QC_Tracker.

I literally need step-by-step instructions. Rick, if you read this, you
tried to help me previously but then I was out for a while and now I'm
getting back at it.

Thanks to anyone who can help!!!!
 
NotIT,
Sorry, I can't think of any way to do what you want without coding. I
have never used macros, so I'm really unfamiliar with thier capabilities.

*** Why don't you try a new post... you can cut and paste your original
question/setup, but make sure you let folks know that you can't use code.
Someone may have a raesonable work-around for you.

I usually don't use a text box to enter a search value, I use a Combobox
that's only populated with legitimate search values to begin with, so when
someone enters a bogus value, the combo automatically informs the user of
the error, and allows them to try again. So that's half the battle there,
then just do a Find on the AfterUpdate event of the ComboBox.

Hang in there... and try again,
Al Camp

NotIT said:
I appreciate the help, but you are over my head - is there something I can
do
using expression builder to do this? I haven't written code before.
Thanks!!!

Al Camp said:
NotIT,
I just used this response to a previous post. It does what you are
trying to do, but uses FindCustID as the search text control, and CustID
as
the key field being searched... instead of Loan_Number.
Just look at the concept, and "translate" it to your situation.

Let's call the text control where you'll enter the CustID to look for
[FindCustID]

Private Sub FindCustID After_Update()
' After you enter a value to find
Dim Response as string, Prompt as String, Title as String
If IsNull("[CustID]", "tblCustomers", "CustID =
Forms!YourFormName!FindCustID" Then
' The CustID does not exist... offer user 2 choices...
Prompt = "This Customer ID does not exist. OK = Add new Cancel =
Retry another CustID"
Title = "CustID Not Found"
Response=MsgBox(Prompt, vbOKCancel, Title)
If Response = vbOK then
' Open a form if needed or just go to a New record
DoCmd.GoToRecord , , acNewRec
ElseIf Response = vbCancel Then
FindCustID = ""
Exit Sub
End If
Else
' The CustID exists... Do your normal CustID Find code here
End if
---------------------------------------------------------------
Adjust to suit...
hth
Al Camp

NotIT said:
I have the following field:

Loan_Number

What I want to happen is that the user opens up the form. They type in
their loan number, lets say it's 12345. They click on a pair of
binoculars
next to the loan number and a pop-up box or message box will appear
telling
them that it's unable to find that loan number (because it doesn't
exist)
OR,
when they hit the binoculars it just takes them to loan number 12345
because
it turns out it's already in our database.

Can someone tell me EXACTLY how to do this?

My field name is Loan_Number, the name of my form is QC_Audit and the
name
of the database is QC_Tracker.

I literally need step-by-step instructions. Rick, if you read this,
you
tried to help me previously but then I was out for a while and now I'm
getting back at it.

Thanks to anyone who can help!!!!
 
Ok, thanks, I reposted!

Al Camp said:
NotIT,
Sorry, I can't think of any way to do what you want without coding. I
have never used macros, so I'm really unfamiliar with thier capabilities.

*** Why don't you try a new post... you can cut and paste your original
question/setup, but make sure you let folks know that you can't use code.
Someone may have a raesonable work-around for you.

I usually don't use a text box to enter a search value, I use a Combobox
that's only populated with legitimate search values to begin with, so when
someone enters a bogus value, the combo automatically informs the user of
the error, and allows them to try again. So that's half the battle there,
then just do a Find on the AfterUpdate event of the ComboBox.

Hang in there... and try again,
Al Camp

NotIT said:
I appreciate the help, but you are over my head - is there something I can
do
using expression builder to do this? I haven't written code before.
Thanks!!!

Al Camp said:
NotIT,
I just used this response to a previous post. It does what you are
trying to do, but uses FindCustID as the search text control, and CustID
as
the key field being searched... instead of Loan_Number.
Just look at the concept, and "translate" it to your situation.

Let's call the text control where you'll enter the CustID to look for
[FindCustID]

Private Sub FindCustID After_Update()
' After you enter a value to find
Dim Response as string, Prompt as String, Title as String
If IsNull("[CustID]", "tblCustomers", "CustID =
Forms!YourFormName!FindCustID" Then
' The CustID does not exist... offer user 2 choices...
Prompt = "This Customer ID does not exist. OK = Add new Cancel =
Retry another CustID"
Title = "CustID Not Found"
Response=MsgBox(Prompt, vbOKCancel, Title)
If Response = vbOK then
' Open a form if needed or just go to a New record
DoCmd.GoToRecord , , acNewRec
ElseIf Response = vbCancel Then
FindCustID = ""
Exit Sub
End If
Else
' The CustID exists... Do your normal CustID Find code here
End if
---------------------------------------------------------------
Adjust to suit...
hth
Al Camp

I have the following field:

Loan_Number

What I want to happen is that the user opens up the form. They type in
their loan number, lets say it's 12345. They click on a pair of
binoculars
next to the loan number and a pop-up box or message box will appear
telling
them that it's unable to find that loan number (because it doesn't
exist)
OR,
when they hit the binoculars it just takes them to loan number 12345
because
it turns out it's already in our database.

Can someone tell me EXACTLY how to do this?

My field name is Loan_Number, the name of my form is QC_Audit and the
name
of the database is QC_Tracker.

I literally need step-by-step instructions. Rick, if you read this,
you
tried to help me previously but then I was out for a while and now I'm
getting back at it.

Thanks to anyone who can help!!!!
 
Back
Top