Search and pull data from db stored in a shared path

aaromic2000

New member
Local time
Today, 22:48
Joined
Dec 30, 2014
Messages
6
Hi I have two different database files. One is 2010 ".accdb" format where I have created a form and the inputs to the form is getting saved as records to an access.mdb file in a shared path.

Now if the users want to edit the existing record I should allow them to search their previously submitted record with a unique ID number.

I know it is possible when we have both the form and table in the same db. But I want to know whether it is possible to search with a unique ID and pull the data from different db in a shared path using a command button?

If possible please help me with some sample codes. Thanks
 
It is possible to do this.
Let me restate your question to get things started.
There is first DB (2010) with both code and tables in the same file.
There is a second DB (what version?) on a shared directory with both code and tables in one file.

The objective is for the first DB to use a LINKED TABLE to the 2nd db to Read/Write data to the 2nd DB.

For MS Access, it is prefered to SPLIT a DB into the Front-End (forms, reports, queries) and used LINKED TABLE to the Back-End (an ACCDB with just the tables).
Once MS Access goes beyond a single user for sharing data, there is the multi-user collisions to consider. For the sake of your question, we will skip that for now. However, if either DB begin to experience problems when multiple users are engaged, strongly consider the SPLIT DB to increase efficiency and and simplicity.

On the Access Toolbar - choose the External Data. Then choose the Access icon for the external type. Navigate to the shared 2nd DB. Choose the tables that will be engaged.
These will now show up as a LINKED TABLE on your Table objets.
Basically, they will be used in the same way as a Local Table (a table in the 1st DB).

If this description needs modification, let us know. Feel free to post additional questions from this point.

Here is a tutoral to get started:
http://www.worldbestlearningcenter.com/index_files/Access-2010-table-relationship-link-table.htm
 
Thank you RX for replying to my thread. Whatever you've restated is correct. The first db where I have the form and macros is 2010 format and the second db which is stored in a shared folder is 2007 format. I've actually created the linked table and my concern is now the VBA program to search and pull the record from the linked table.

The linked table name is "DATA", first db name as well as form name is "Tracker" and the 2nd db name is "Data Tracker"

Can you please help me with a sample coding?

Thanks in advance
 
Question 1: What is it you plan to accomplish?
e.g. Every time the form Tracker in 1st DB is updated, log a new record in Data Tracker.
Question 2: What do the two tables (in DB 1 and DB2) have in common? In other words, what is the relationship? Do they have foreign keys in common? Is the Date the only common element between them?

Question 3: What are the fields that need to be filled out in DB 2 "Data Tracker"
this is somewhat related to question 2.
 
I'm able to log a new record successfully from DB1 to DB2

1. I'm finding a way to retrieve the updated log using a search option. e.g., If they have updated an activity as "Pending" I should allow them to pull that row back using search button and edit accordingly later. (multiple fields are involved)

2. Both have all the fields in common. But the search can be done only with the unique ID from the last record to pull the data of a particular row.
 
Sounds like you have the basics in place now.
So, basically there is a Primary Key ID on an existing listbox (or list of items) record on your form highlighted.
Q. Is that one above already built and working?

There needs to be a second search window based on a different table that filters to a unique ID from the first form's currently selected record. Is that right?
Does the 2nd search form need to display only (read only)?

That brings up many ways to accomplish your goal.
This suggestion has worked well for others in the past. You have a unique collection of examples at http://www.access-programmers.co.uk/forums/forumdisplay.php?f=64
I myself downloaded about 40 of them in a directory to evaluate. It has helped me copy some solutions that I would not have thought about on my own.
If you can go through a group of them and find an example you like, it would easier to assist you modify or re-use it than starting from scratch.

At this point, with your linked table, there is little difference that it is remote. It will behave as if it was all in one DB. The question may now be "pop-up" vs "independent coded list box" solutions.
 

Users who are viewing this thread

Back
Top Bottom