code no longer working

G

Gary Dolliver

Hi all,
I had set up a look up button with the following code to be run when clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks ago, I
left it alone, and when I came back, it keeps stating that it cannot find the
ID (.NoMatch)
The form that the button is attached to is controlled by the table Items and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
G

Gary Dolliver

Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I also
do not get any errors, it goes through no problem. Upon checking the control
source for the form, I can find the item_id I am looking for (and have tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to import
the form, but after configuring it (renaming it) it will not work.
???
-gary

Mark A. Sam said:
Gary,
Did you make any field name changes?
What happens when you compile?

Gary Dolliver said:
Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks ago, I
left it alone, and when I came back, it keeps stating that it cannot find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
M

Mark A. Sam

Gary,

Here are a couple more things you can try. 1) Decompiling the DB. I don't
recall the command line, but you can do a google search on groups with the
keywords "Access decompile". (first make a backup copy) Open a module and
check your references, that non are "missiing" and all that you need are
checked. 3) Instead of importing just the form, create a new DB and import
the whole DB. Remember to check your references that you have all the
necessary libraries checked.

Is the problem occuring on the same machine that you had used before? That
may be a concern.

God Bless,

Mark


Gary Dolliver said:
Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I
also
do not get any errors, it goes through no problem. Upon checking the
control
source for the form, I can find the item_id I am looking for (and have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

Mark A. Sam said:
Gary,
Did you make any field name changes?
What happens when you compile?

Gary Dolliver said:
Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks
ago, I
left it alone, and when I came back, it keeps stating that it cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
M

Mark A. Sam

Gary,

Did you get this resolved? I just posted a message on this thread and when
I marked it as read (becuase I have a watch on it) it got marked as no
longer available and disappreared. I'll repost it if you need it.

God Bless,

Mark


Gary Dolliver said:
Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I
also
do not get any errors, it goes through no problem. Upon checking the
control
source for the form, I can find the item_id I am looking for (and have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

Mark A. Sam said:
Gary,
Did you make any field name changes?
What happens when you compile?

Gary Dolliver said:
Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks
ago, I
left it alone, and when I came back, it keeps stating that it cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
G

Gary Dolliver

Hi Mark,
Looks like I got 2 posts, but I have not tried decompiling yet... Once I do,
I will post my results. Thanks for following up!
-gary

Mark A. Sam said:
Gary,

Did you get this resolved? I just posted a message on this thread and when
I marked it as read (becuase I have a watch on it) it got marked as no
longer available and disappreared. I'll repost it if you need it.

God Bless,

Mark


Gary Dolliver said:
Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I
also
do not get any errors, it goes through no problem. Upon checking the
control
source for the form, I can find the item_id I am looking for (and have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

Mark A. Sam said:
Gary,
Did you make any field name changes?
What happens when you compile?

Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks
ago, I
left it alone, and when I came back, it keeps stating that it cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
G

Gary Dolliver

Hi Mark,
Sorry this took so long to get back to you. I decompiled and checked my
references, they are all the same, and none are missing. I then copied the
old .mdb file and started bringing in all the files from the newer .mdb, one
part at a time. I had no problems bringing in the queries, forms, and
reports. However, when I relinked the tables is when the problem appeared
and the code stopped working. I am using MySQL tables linked via ODBC. I am
not sure why the tables would have this effect...
Any thoughts?
-gary

Mark A. Sam said:
Gary,

Here are a couple more things you can try. 1) Decompiling the DB. I don't
recall the command line, but you can do a google search on groups with the
keywords "Access decompile". (first make a backup copy) Open a module and
check your references, that non are "missiing" and all that you need are
checked. 3) Instead of importing just the form, create a new DB and import
the whole DB. Remember to check your references that you have all the
necessary libraries checked.

Is the problem occuring on the same machine that you had used before? That
may be a concern.

God Bless,

Mark


Gary Dolliver said:
Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I
also
do not get any errors, it goes through no problem. Upon checking the
control
source for the form, I can find the item_id I am looking for (and have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

Mark A. Sam said:
Gary,
Did you make any field name changes?
What happens when you compile?

Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks
ago, I
left it alone, and when I came back, it keeps stating that it cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
M

Mark A. Sam

Hello Gary,

I don't know a thing about MySql. Is is possible that a permission or
property got changed on a table? When you tell me that the problem
occurred when relinking, it tells me that the code isn't the problem, but
the table(s). Can you open the the tables in question from the database
window?



Gary Dolliver said:
Hi Mark,
Sorry this took so long to get back to you. I decompiled and checked my
references, they are all the same, and none are missing. I then copied
the
old .mdb file and started bringing in all the files from the newer .mdb,
one
part at a time. I had no problems bringing in the queries, forms, and
reports. However, when I relinked the tables is when the problem appeared
and the code stopped working. I am using MySQL tables linked via ODBC. I
am
not sure why the tables would have this effect...
Any thoughts?
-gary

Mark A. Sam said:
Gary,

Here are a couple more things you can try. 1) Decompiling the DB. I
don't
recall the command line, but you can do a google search on groups with
the
keywords "Access decompile". (first make a backup copy) Open a module
and
check your references, that non are "missiing" and all that you need are
checked. 3) Instead of importing just the form, create a new DB and
import
the whole DB. Remember to check your references that you have all the
necessary libraries checked.

Is the problem occuring on the same machine that you had used before?
That
may be a concern.

God Bless,

Mark


Gary Dolliver said:
Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I
also
do not get any errors, it goes through no problem. Upon checking the
control
source for the form, I can find the item_id I am looking for (and have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

:

Gary,
Did you make any field name changes?
What happens when you compile?

message
Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks
ago, I
left it alone, and when I came back, it keeps stating that it cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
G

Gary Dolliver

Hi Mark,
Yes, I can open all the tables, no errors appear... I am baffled. I am in
agreement now that the code is not the problem, as comparing it between the
old and new, there is no difference. Somehow, I am going to need to figure
out what happened with the tables... ugh
Thanks for the help!
-gary

Mark A. Sam said:
Hello Gary,

I don't know a thing about MySql. Is is possible that a permission or
property got changed on a table? When you tell me that the problem
occurred when relinking, it tells me that the code isn't the problem, but
the table(s). Can you open the the tables in question from the database
window?



Gary Dolliver said:
Hi Mark,
Sorry this took so long to get back to you. I decompiled and checked my
references, they are all the same, and none are missing. I then copied
the
old .mdb file and started bringing in all the files from the newer .mdb,
one
part at a time. I had no problems bringing in the queries, forms, and
reports. However, when I relinked the tables is when the problem appeared
and the code stopped working. I am using MySQL tables linked via ODBC. I
am
not sure why the tables would have this effect...
Any thoughts?
-gary

Mark A. Sam said:
Gary,

Here are a couple more things you can try. 1) Decompiling the DB. I
don't
recall the command line, but you can do a google search on groups with
the
keywords "Access decompile". (first make a backup copy) Open a module
and
check your references, that non are "missiing" and all that you need are
checked. 3) Instead of importing just the form, create a new DB and
import
the whole DB. Remember to check your references that you have all the
necessary libraries checked.

Is the problem occuring on the same machine that you had used before?
That
may be a concern.

God Bless,

Mark


Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled, I
also
do not get any errors, it goes through no problem. Upon checking the
control
source for the form, I can find the item_id I am looking for (and have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

:

Gary,
Did you make any field name changes?
What happens when you compile?

message
Hi all,
I had set up a look up button with the following code to be run when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple weeks
ago, I
left it alone, and when I came back, it keeps stating that it cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 
M

Mark A. Sam

Did you try editing the data in the open tables?


Gary Dolliver said:
Hi Mark,
Yes, I can open all the tables, no errors appear... I am baffled. I am
in
agreement now that the code is not the problem, as comparing it between
the
old and new, there is no difference. Somehow, I am going to need to
figure
out what happened with the tables... ugh
Thanks for the help!
-gary

Mark A. Sam said:
Hello Gary,

I don't know a thing about MySql. Is is possible that a permission or
property got changed on a table? When you tell me that the problem
occurred when relinking, it tells me that the code isn't the problem, but
the table(s). Can you open the the tables in question from the database
window?



Gary Dolliver said:
Hi Mark,
Sorry this took so long to get back to you. I decompiled and checked
my
references, they are all the same, and none are missing. I then copied
the
old .mdb file and started bringing in all the files from the newer
.mdb,
one
part at a time. I had no problems bringing in the queries, forms, and
reports. However, when I relinked the tables is when the problem
appeared
and the code stopped working. I am using MySQL tables linked via ODBC.
I
am
not sure why the tables would have this effect...
Any thoughts?
-gary

:

Gary,

Here are a couple more things you can try. 1) Decompiling the DB. I
don't
recall the command line, but you can do a google search on groups with
the
keywords "Access decompile". (first make a backup copy) Open a module
and
check your references, that non are "missiing" and all that you need
are
checked. 3) Instead of importing just the form, create a new DB and
import
the whole DB. Remember to check your references that you have all the
necessary libraries checked.

Is the problem occuring on the same machine that you had used before?
That
may be a concern.

God Bless,

Mark


message
Thanks for the reply. I did not change any field names, that I can
remember... I do not receive any error messages and when I compiled,
I
also
do not get any errors, it goes through no problem. Upon checking
the
control
source for the form, I can find the item_id I am looking for (and
have
tried
others and they do not work either)
I tried checking an older version of this, and it works - so I try
to
import
the form, but after configuring it (renaming it) it will not work.
???
-gary

:

Gary,
Did you make any field name changes?
What happens when you compile?

message
Hi all,
I had set up a look up button with the following code to be run
when
clicked:

Dim strFindID As String
On Error GoTo Err_Handler
strFindID = InputBox("Enter the Item ID you're looking for:")
If IsNumeric(strFindID) Then
With Me.RecordsetClone
.FindFirst "[Item_ID]=" & strFindID
If .NoMatch Then
MsgBox "Sorry, couldn't find that Item ID."
Else
Me.Bookmark = .Bookmark
End If
End With
Order_ID1.Value = Order_ID.Value
Creation_ID1.Value = Creation_ID.Value
Item_ID1.Value = Item_ID.Value
ProdCode1.Value = ProdCode.Value
Else
MsgBox "Please enter a valid Item ID!"
End If
Exit_Here:
Exit Sub
Err_Handler:
Resume Exit_Here

However, it no longer seems to be working (it worked a couple
weeks
ago, I
left it alone, and when I came back, it keeps stating that it
cannot
find
the
ID (.NoMatch)
The form that the button is attached to is controlled by the
table
Items
and
there is a field Item_ID in this table.
Any thoughts or help is always appreciated, thanks!
-gary
 

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

Command Button to Find and Filter Records 1
Search Box 5
Code no longer works 4
rs.FindFirst limits? 3
Openargs Not Working 4
Cbo Not In List code error 9
searh for record. 2
form sequence code not working 2

Top