473,323 Members | 1,589 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Make Source Object property read any input file

Thanks in advance to all people seeing this!

I am a newbie in Access and i want to know if it's possible to program my Forms and Subforms so they could read all data from a input Excel file.

Right now, I have succesfully managed to let the user introduce a file(Only Excel files) and grab all the information and put it into a new Access Table. It's important to say that I stored in a separated Module, the information related to each file.( It's Filename and Path).

My issue is that all my current Forms and SubForms are related from an Excel file that I used at the beginning to see working my program. However, I need to set the Source Object Property for each of my Forms and SubForms based on the new file introduced.

Thanks
Oct 30 '15 #1
1 921
zmbd
5,501 Expert Mod 4TB
You would use the linked table manager to change where the linked to table is pointing.

This is essentially the same as relinking to the back-end of a split database.

Use the File dialog method given here:
Insights>Select a File or Folder using the FileDialog Object to allow the user to find and select the proper file. Once you return the full-path-file from this dialog, you can use it to feed to code that relinks and refreshes the linked table connection

One such example is here: Insights>how to change backend database links. (access 2003)

and another such example is here (keep in mind that one would not nessarily need the auto-startup section, just the re-linking code... unless of course, that's what you're after at startup): Allen Browne: Reconnect Attached tables on Start-up

Both of these examples can be modified to use the returned path from the file dialog object.

Hopefully this will set you on the right track. If you run into issues post back and we'll hit it with a bigger hammer. :)
Oct 30 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Yong Wang | last post by:
Hi, All: I need to read a input file as soucre to process data. Ideally if I can read a line from input file as a list (coloumn separate by white space), reorganize field in a line. Does python...
1
by: Stephan Gehrlein | last post by:
Hello, I am using an access 2000 project with sql srv 2000 as an administrative tool to edit table data. I select the table names from a combobox in an access form and use myform.SourceObject =...
3
by: Mark | last post by:
Hello all - This has been frustrating me long enough that I'm willing to appeal to the gurus out there to put this in my rear view mirror. I'm trying to access a JPEG file that I have within my...
2
by: I_AM_DON_AND_YOU? | last post by:
Can BinaryReader Object read the Word file?
2
by: Don | last post by:
If you expose an object as a property in a VB.NET class, like so: public class MyClass private obj as NestedClass Public Readonly Property NestedObj as OtherClass Get return obj End Get...
2
by: Oleg Subachev | last post by:
I have one interface "Intf1" with read-write property "Prop" (with "get" and "set" accessors). Then I declare derived interface "Intf2" with the same property "Prop" declared as read-only...
3
by: mariyana | last post by:
I have file in a path. Eg: filename is donno.xml in "c:\temp" . I have an object call objRep. How can make this object point to filename( donno.xml)
3
by: lajet | last post by:
I have a problem in reading doc file. I've developed a program whcih can open and read the file. If the file is doc file it calls directly to the winword.exe that saved under the directory. But if...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.