Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access query returning values which are not in table

Status
Not open for further replies.

emilybartholomew

Technical User
Aug 3, 2001
82
US
Hello-
I posted this in the VBA Coding forum too.

I have a mysql database which I've linked to an Access db in ordre to create forms and reports for my users. I have this table (called funding) which has an auto-increment primary key (called f_id). It doesn't do anything other than uniquely identify each row. I am trying to write a routine that will delete a row out of the funding table based on this f_id. The weird thing is that when I open my recordset and loop through the values of "f_id" for the funding table, not only does it not show the most recent entries, it returns records which I have deleted manually from the table.

Table looks like this:
.
.
.
189
190
245

Returned values look like this:
.
.
.
189
190
191
192
193

Does anyone know why this is happening? I'm using myodbc 2.5, Access 2000, mysql 3.23 (I think) I've installed the most recent MDAC and MS Jet 4.0 service pack 5.
 
Did you import the table or link it? A linked table will have an image of a little arrow to the left of it in the tables view. If you don't see the little arrow, there is a chance that the table was imported instead of linked.

Something else that you can try is to delete the table and relink it. Although this is not a permanent solution, if it resolves your problem, it may lead you to find the real problem.
 
I am linking the table. I just tried deleting and re-linking, but it didn't help.

My gut tells me the problem is that it's an autonumber field, but everything I've seen says that Access treats autonumbers like regular number fields, in which case this problem doesn't make sense.
 
OK, I'm really lame. I figured out why this is happening - I was connecting to the wrong database!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top