Access version problem w/ NoMatch

BrokenBiker

ManicMechanic
Local time
Today, 07:48
Joined
Mar 22, 2006
Messages
128
I found this link:

http://support.microsoft.com/kb/190515/en-us

and I tried it out, but I get an error saying that it can't find the NoMatch clause. It shows up in the help file, saying you have to use a Seek function (which this has).

The original VBA is for Access97. I'm using 2003. Any ideas on this?
 
I would try something a lot simpler to just find a record.

Each record must have a unique identifier like an AutoNumber field. Store the current records unique identifier in a table. In the OnOpen event of the form, find the records unique identifier with a DLookup() function. In my example below, I am using the SSN from a field to find the record but it should get you started...

Code:
    Dim sSSN As String
    sSSN = "123456789"
    Me.SSNtexBox.SetFocus
    DoCmd.FindRecord sSSN
 
I was hoping not to have to close and re-open the form, but it might work out fine nonetheless. I've seen other posts that say to store the PK field in a separate table. How do you go about doing that? It seems like it would be difficult to enter the last viewed/updated record's PK into another table.
 

Users who are viewing this thread

Back
Top Bottom