Code For A DBase IV linked Table

  • Thread starter Thread starter Randy Fritz
  • Start date Start date
R

Randy Fritz

Hello NG

I Have a linked DBase IV Table. Oops Sorry Access 97. I have a form in
which I add employees into our db and then add the employees into the dbase
table for other applications. The Adding works fine. My Problem is if I edit
information I cannot seem to edit the dbase table. What do I not know that
would affect editing a dbase table.

When I add I do the following

set rs = db.openrecordset("DBase Table",dbOpenDynaset)
with rs
.addnew
DBase Fields = Form Fields
.Update
end with

When I Edit I do the following

set rs = db.openrecordset("SQL Query For Specific Employee Record",
dbOpenDynaset)
with rs
.edit
DBase Field To Change = Form Field New Value
.update
end with

So what am I doing wrong?

TIAFAH

Randy
 
Hi Randy,

When you edit, you open a query. What's the query? Is it updateable?

Immanuel Sibero
 
Hi Immanuel

the Query I use is as follows

Set rs = db.OpenRecordset("SELECT * FROM [DBase Table] WHERE [EMPNMBR]=" &
Me![Employee Number] & ";", dbOpenDynaset)

Though Now I guess I have more of a consistency Problem in the fact that I
tried to edit a record 5 different times and it never updated but when I put
a breakstop in the code and stepped through it - it did edit the field. So
how do I get consistency to make sure that it is updated.

Randy
 
Hi Randy,

Thanks for the additional info on the consistency problem. At least we know
that the table is updateable.
I still cant see anything wrong. Will you post the whole code?

Immanuel Sibero


Randy Fritz said:
Hi Immanuel

the Query I use is as follows

Set rs = db.OpenRecordset("SELECT * FROM [DBase Table] WHERE [EMPNMBR]=" &
Me![Employee Number] & ";", dbOpenDynaset)

Though Now I guess I have more of a consistency Problem in the fact that I
tried to edit a record 5 different times and it never updated but when I put
a breakstop in the code and stepped through it - it did edit the field. So
how do I get consistency to make sure that it is updated.

Randy

Immanuel Sibero said:
Hi Randy,

When you edit, you open a query. What's the query? Is it updateable?

Immanuel Sibero
form
in I
edit
 
Back
Top