Form writing to wrong table

Bobp3114

Member
Local time
Today, 20:58
Joined
Nov 11, 2020
Messages
69
I have a form writing to a table that appears to be in an older version of the database. how can I find this table. The for opens, accepts data and closes without any error mesasage. The data file (split database) has been backed up numerous times but I cannot find the table (tblVisits) containing data entered recently. Cannot get Object dependancy to open in this particular Database
 
If the tblVisits is linked, you can create a query with this SQL to find out where the backend database is located:
Code:
SELECT msysObjects.Name, msysObjects.Type, msysObjects.Database
FROM msysObjects
WHERE msysObjects.Type=6 OR msysObjects.Name ="tblVisits";
 
If the tblVisits is linked, you can create a query with this SQL to find out where the backend database is located:
Code:
SELECT msysObjects.Name, msysObjects.Type, msysObjects.Database
FROM msysObjects
WHERE msysObjects.Type=6 OR msysObjects.Name ="tblVisits";
This works to show current linked tables
My problem is that it seem to be saving the records to a different tblVisits in another, previous saved, backend and i cant figure out where
 
This works to show current linked tables
My problem is that it seem to be saving the records to a different tblVisits in another, previous saved, backend and i cant figure out where
Open the form in design mode. Then, go to Properties pane > Data tab > Record source property

There should be some string in the Record source property, that's what your table is bound to. What does it say?
 
Why not look in the Linked Table manager? :unsure:
1747813455350.png
 
My problem is that it seem to be saving the records to a different tblVisits in another, previous saved, backend and i cant figure out where
If you are using an unbound form, check your DAO/ADO code. If your form is bound to a linked table or a query, that will tell you which BE is being referenced. Check the query using SQL view since it is possible to hard-code a path in a query.
 
You got some great advice from my colleagues. At least one of those suggestions should work for you. Looking at "linked table manager" or the form's .RecordSource are most likely to be definitive.

However, there is an outside chance of some tricky little code redirecting the records. You would perhaps remember if you did something like this, but... In this form that you think is saving records elsewhere, open the class module for that form and look for text string "INSERT INTO tblVisits" anywhere in the module. It is possible to have something that looks like this:

Code:
INSERT INTO tblVisits IN {some file spec} (list of fields) VALUES (list of values) ;

The above would direct the records into an external DB file. If you HAD done something like this, you should remember it, but maybe this would jog your memory.

There is ALSO the possibility that tblVisits isn't linked at all, that it MIGHT be a local table that was just never moved and thus is still in the FE file.

IF none of the above ideas work for you, I know of a tedious way to use Resource Manager to find all of the files opened by your Windows process. Reply to this message using the Reply link in the lower right corner of the post and ask me about using Resource Manager if none of the other ideas work.
 

Users who are viewing this thread

Back
Top Bottom