If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Problem with a linked table
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 |
#2
|
|||
|
|||
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 "Carl Rapson" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
unable to repair inobox | Sudheer Mumbai | General Discussion | 1 | February 20th, 2005 11:55 AM |
Access application with SQL backend linked table problem | Steve | General Discussion | 0 | February 15th, 2005 09:03 PM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Access Linked Table Problem | James Edwards | General Discussion | 5 | September 10th, 2004 05:06 PM |
Access and Linked Table Problem | James Edwards | New Users | 6 | September 10th, 2004 04:38 PM |