473,405 Members | 2,176 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,405 software developers and data experts.

Access 2000 File/Open box

I have created a small database that imports a text file with a macro
through TranserText into a table. I would like to be able to add the
ability for it to give the File/Open box so someone could pick the file
they will be importing. Is there a way I can do that and call that from
within my macro?
Thanks

Nov 13 '05 #1
5 1588
Not sure if you can call it from within a macro, since I never use
macros. but there's code to do it right here...

http://www.mvps.org/access/api/api0001.htm

You could create a button that called this and then passed the result
to the TransferText command...

this is assuming that you grabbed the code from the above link and
dropped it into it's own module and saved it... then you can just do
something like this....

Private Sub Command0_Click()
'create a variable to hold the filename to import.
Dim strFileToImport As String

If Len(strFile) <> 0 Then
strFileToImport = basOpenSaveFileAPI.TestIt
DoCmd.TransferText acImportDelim, , "MyTable", strFileToImport,
True
Else
MsgBox "please specify a file to import!"
End If
End Sub

You'll need to modify the TransferText stuff to suit your situation -
the file type (is it delimited?), what table your data is going into,
etc...

Nov 13 '05 #2
i wont to work in toronto.

Nov 13 '05 #3
"anyla_80" <al**********@k.ro> wrote
i wont to work in toronto.


Is that "I won't work in Toronto." or "I want to work in Toronto."?

And do you realize how really, really cold it gets there?
Darryl Kerkeslager
No kill I

Nov 13 '05 #4
Darryl Kerkeslager wrote:
"anyla_80" <al**********@k.ro> wrote
i wont to work in toronto.


Is that "I won't work in Toronto." or "I want to work in Toronto."?

And do you realize how really, really cold it gets there?
Darryl Kerkeslager
No kill I


Your 1D metric needs some augmentation :-). Toronto is a great city.
It is even more multi-cultural than, say, Boston or L.A., including the
largest Asian population in North America. It has a vibrant economy,
moderately low crime, friendly people and great food. It also has lots
of good coffee shops to help fend off the cold. The only negatives are
the cold, the exchange rate (if you work there) and a game of pool
costing a loonie (Canadian dollar coin). I don't include the high
taxes as a negative because of what they get in return, such as free
health insurance. Disclaimer: I don't live in Toronto.
James A. Fortune

Nov 13 '05 #5
Darryl Kerkeslager wrote:
"anyla_80" <al**********@k.ro> wrote
i wont to work in toronto.

Is that "I won't work in Toronto." or "I want to work in Toronto."?

And do you realize how really, really cold it gets there?


put some thick socks on you big jessie :-)

--
This sig left intentionally blank
Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: chicha | last post by:
Hey people, I have to convert MS Access 2000 database into mysql database, the whole thing being part of this project I'm doing for one of my faculty classes. My professor somehow presumed I...
1
by: Steve Claflin | last post by:
I have a database with a moderate number of records in several tables (the biggest table at the moment is about 800 records). In development it got moved between 2K and XP repeatedly. Several...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
11
by: stu | last post by:
I have several databases that are opened using various versions of Access and VB. Up till recently everything worked fine, then I started getting a variety of lock file error messages, both on my...
3
by: Nigel C | last post by:
I have been tasked with converting a legacy Access 2 system to Access 2000. This in itself is not the issue. I have a copy of the Program, Data and SYSTEM.MDA file used by the client. However, I...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
49
by: Mell via AccessMonster.com | last post by:
I created databases on Access 2003 and I want to deploy them to users. My code was also done using 2003. If they have Ms Access 2000 or higher, will they be able to use these dbs with all code,...
10
by: Walshi | last post by:
Hi all, I'm a relative newby to access and VBA etc. My forms and tables etc are working great and saving lots of time...However... I have two databases with the exact same table format. I want...
13
yolenman
by: yolenman | last post by:
Hello - This is my first posting to this group, so please bear with me. Also note, that while I'm intelligent, databases are not in my field of knowledge. I'm working with a small limousine...
9
by: O | last post by:
I need to do some lookups and updates on some legacy Access 2.0 files (they've from another vendor and I'm not in a position to update them). I was successful using VB6, but I've moved on to VS...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.