Problem with a linked table

C

Carl Rapson

I've got a form based on a table in my application, and I have a command
button that does some processing after filling in the fields for a record.
When the button is clicked, I first call Me.Refresh to ensure that the
record is saved. My command button procedure then calls a function that
fetches the just-entered record (by passing the PK value to it) and does
some things with it. This all worked fine until I split my data tables into
a back-end file. Now, when I click the command button, I get an error when I
attempt to fetch the just-entered record. I stepped through the code, and it
looks like the record I just entered isn't in the data table (I open the
table into a recordset and do a FindFirst), although if I look at the table
while the form is open (before clicking the command button) I can see the
just-added record. After I get the error, I exit the form and the record is
no longer in the table. What I find odd is, if I re-import the data table
into my FE, the process once again works correctly. This only happens when I
split the table into a BE file.

Any ideas as to why splitting out the table might have this effect?

Carl Rapson
 
C

Carl Rapson

Well, I solved it myself. As usual, it was something I overlooked. The
OpenRecordset call was using a type of dbOpenTable, which worked fine when
the table was local. With a linked table, apparently, I have to use a
different type. I changed it to dbOpenDynaset, and now everything works
fine.

Carl Rapson
 

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

Top