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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic and Access Frustration.....

Status
Not open for further replies.

Timinator

Programmer
Apr 13, 2001
33
0
0
US
I am using a Visual Basic form and an Access table for the back end. To add a record to the table i use the code below:

With adoTable.Recordset
.AddNew
.Fields("order_number) = LastOrderNumber + 1
.Fields("customer_id") = txtPartNumber
.Fields("invoice_date") = Date
.Update
End With

97% of the time this works fine, but there has been times where a record is put in that is not picked up by the recordset. When I open the access table, the record is there, just like it should be, but it does not show up in my VB program. When I compact the access database, which is like formatting it, it works fine.

Any ideas??....i'm stumped

Thanks.

Tim

 
Tim,

Need a little more information. Is your recordset just in memory or is it linked to a table in Access? If it is linked to a table in Access while you are AddNew and update then what kind of connection are you setting up?

May be able to assist you more once these become clear.

Mavors
Cincinnati, Ohio
 
Mavors,

The ado is linking to a table in access. The connection i'm using is the Microsoft Jet 4.0 engine. The select statement is something like this "SELECT * From Table".

Thanks.

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top