DoCmd.FindRecord Me!

G

Guest

I got the DoCmd.GoToControl to work, but it hangs on the DoCmd.FindRecord
Me!txtSearch. What am I doing wrong, I have tried to write this a number of
ways. PARTS is the name of the query.

Private Sub cmdsearch_Click()
Dim strPARTSRef As String
Dim strSearch As String


If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter a Part Number !", vbOKOnly, "Invalid Search
Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------


DoCmd.ShowAllRecords
DoCmd.GoToControl ("MODEL")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strpartSearch.Text
txtSearch.SetFocus
strSearch = txtSearch.Text



If strPARTSRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congrats!"
strMODEL.SetFocus
txtSearch = ""


Else
MsgBox "Match Not Found For: " & strSearch & " - Re-Enter Part
Number.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
 
G

Guest

Hi, Its me again

Can you post your mdb to
chamudim <@> hotmail <.> com

I'll would like to have a look at it.
If you don't mind sending it, then zip it first because hotmail has issues
with mdb's
 
G

Guest

OK

Ofer Cohen said:
Hi, Its me again

Can you post your mdb to
chamudim <@> hotmail <.> com

I'll would like to have a look at it.
If you don't mind sending it, then zip it first because hotmail has issues
with mdb's

--
Good Luck
BS"D


tmaxwell said:
I got the DoCmd.GoToControl to work, but it hangs on the DoCmd.FindRecord
Me!txtSearch. What am I doing wrong, I have tried to write this a number of
ways. PARTS is the name of the query.

Private Sub cmdsearch_Click()
Dim strPARTSRef As String
Dim strSearch As String


If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter a Part Number !", vbOKOnly, "Invalid Search
Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------


DoCmd.ShowAllRecords
DoCmd.GoToControl ("MODEL")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strpartSearch.Text
txtSearch.SetFocus
strSearch = txtSearch.Text



If strPARTSRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congrats!"
strMODEL.SetFocus
txtSearch = ""


Else
MsgBox "Match Not Found For: " & strSearch & " - Re-Enter Part
Number.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
 
G

Guest

I bound the txt, but know it tells me that the strMODEL.SetFocus is empty?
I have never had so much freaking trouble with a form....

DoCmd.ShowAllRecords
DoCmd.GoToControl ("[MODEL]")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strMODEL.Text
txtSearch.SetFocus
strSearch = txtSearch.Text


Ofer Cohen said:
Hi, Its me again

Can you post your mdb to
chamudim <@> hotmail <.> com

I'll would like to have a look at it.
If you don't mind sending it, then zip it first because hotmail has issues
with mdb's

--
Good Luck
BS"D


tmaxwell said:
I got the DoCmd.GoToControl to work, but it hangs on the DoCmd.FindRecord
Me!txtSearch. What am I doing wrong, I have tried to write this a number of
ways. PARTS is the name of the query.

Private Sub cmdsearch_Click()
Dim strPARTSRef As String
Dim strSearch As String


If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter a Part Number !", vbOKOnly, "Invalid Search
Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------


DoCmd.ShowAllRecords
DoCmd.GoToControl ("MODEL")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strpartSearch.Text
txtSearch.SetFocus
strSearch = txtSearch.Text



If strPARTSRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congrats!"
strMODEL.SetFocus
txtSearch = ""


Else
MsgBox "Match Not Found For: " & strSearch & " - Re-Enter Part
Number.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
 
G

Guest

Please send me the new MDB with the table not linked

--
Good Luck
BS"D


tmaxwell said:
I bound the txt, but know it tells me that the strMODEL.SetFocus is empty?
I have never had so much freaking trouble with a form....

DoCmd.ShowAllRecords
DoCmd.GoToControl ("[MODEL]")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strMODEL.Text
txtSearch.SetFocus
strSearch = txtSearch.Text


Ofer Cohen said:
Hi, Its me again

Can you post your mdb to
chamudim <@> hotmail <.> com

I'll would like to have a look at it.
If you don't mind sending it, then zip it first because hotmail has issues
with mdb's

--
Good Luck
BS"D


tmaxwell said:
I got the DoCmd.GoToControl to work, but it hangs on the DoCmd.FindRecord
Me!txtSearch. What am I doing wrong, I have tried to write this a number of
ways. PARTS is the name of the query.

Private Sub cmdsearch_Click()
Dim strPARTSRef As String
Dim strSearch As String


If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter a Part Number !", vbOKOnly, "Invalid Search
Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------


DoCmd.ShowAllRecords
DoCmd.GoToControl ("MODEL")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strpartSearch.Text
txtSearch.SetFocus
strSearch = txtSearch.Text



If strPARTSRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congrats!"
strMODEL.SetFocus
txtSearch = ""


Else
MsgBox "Match Not Found For: " & strSearch & " - Re-Enter Part
Number.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
 
G

Guest

I sent the db and tables, I had to shrink it down a bit. I also had to import
the new form named PARTS.
Thanks !

Ofer Cohen said:
Please send me the new MDB with the table not linked

--
Good Luck
BS"D


tmaxwell said:
I bound the txt, but know it tells me that the strMODEL.SetFocus is empty?
I have never had so much freaking trouble with a form....

DoCmd.ShowAllRecords
DoCmd.GoToControl ("[MODEL]")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strMODEL.Text
txtSearch.SetFocus
strSearch = txtSearch.Text


Ofer Cohen said:
Hi, Its me again

Can you post your mdb to
chamudim <@> hotmail <.> com

I'll would like to have a look at it.
If you don't mind sending it, then zip it first because hotmail has issues
with mdb's

--
Good Luck
BS"D


:

I got the DoCmd.GoToControl to work, but it hangs on the DoCmd.FindRecord
Me!txtSearch. What am I doing wrong, I have tried to write this a number of
ways. PARTS is the name of the query.

Private Sub cmdsearch_Click()
Dim strPARTSRef As String
Dim strSearch As String


If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter a Part Number !", vbOKOnly, "Invalid Search
Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------


DoCmd.ShowAllRecords
DoCmd.GoToControl ("MODEL")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strpartSearch.Text
txtSearch.SetFocus
strSearch = txtSearch.Text



If strPARTSRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congrats!"
strMODEL.SetFocus
txtSearch = ""


Else
MsgBox "Match Not Found For: " & strSearch & " - Re-Enter Part
Number.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
 
G

Guest

Hi Todd

I sent the MDB, please notify me if you got it.

--
Good Luck
BS"D


tmaxwell said:
I sent the db and tables, I had to shrink it down a bit. I also had to import
the new form named PARTS.
Thanks !

Ofer Cohen said:
Please send me the new MDB with the table not linked

--
Good Luck
BS"D


tmaxwell said:
I bound the txt, but know it tells me that the strMODEL.SetFocus is empty?
I have never had so much freaking trouble with a form....

DoCmd.ShowAllRecords
DoCmd.GoToControl ("[MODEL]")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strMODEL.Text
txtSearch.SetFocus
strSearch = txtSearch.Text


:

Hi, Its me again

Can you post your mdb to
chamudim <@> hotmail <.> com

I'll would like to have a look at it.
If you don't mind sending it, then zip it first because hotmail has issues
with mdb's

--
Good Luck
BS"D


:

I got the DoCmd.GoToControl to work, but it hangs on the DoCmd.FindRecord
Me!txtSearch. What am I doing wrong, I have tried to write this a number of
ways. PARTS is the name of the query.

Private Sub cmdsearch_Click()
Dim strPARTSRef As String
Dim strSearch As String


If IsNull(Me![txtSearch]) Or (Me![txtSearch]) = "" Then
MsgBox "Please enter a Part Number !", vbOKOnly, "Invalid Search
Criterion!"
Me![txtSearch].SetFocus
Exit Sub
End If
'---------------------------------------------------------------


DoCmd.ShowAllRecords
DoCmd.GoToControl ("MODEL")
DoCmd.FindRecord Me!txtSearch

strMODEL.SetFocus
strPARTSRef = strpartSearch.Text
txtSearch.SetFocus
strSearch = txtSearch.Text



If strPARTSRef = strSearch Then
MsgBox "Match Found For: " & strSearch, , "Congrats!"
strMODEL.SetFocus
txtSearch = ""


Else
MsgBox "Match Not Found For: " & strSearch & " - Re-Enter Part
Number.", _
, "Invalid Search Criterion!"
txtSearch.SetFocus
End If
End Sub
 

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

Similar Threads


Top