Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to open access table using VBA

Status
Not open for further replies.

Neera

MIS
Nov 9, 2000
10
US
I need to open an access table using Visual basic. Then open a text file. Compare the value in the access table and update the access table.
Can anyone help??
Thanks
 
Tell me what u cannot do?
1. open the table?
2. or open the file?
Can't be both.
Because if ur problem is both of them. My advise is just one: Study more.
 


Hi Neera

Have you imported the text file?

What do you want to compair and how? A join in a query might suffice. Then what?

Might be hard, might be easy.

Say what you have tried and where you get stuck.


Stew

PS I think fdalorzo's advice goes for us all.


"Make good use of bad rubbish."
 
Thanks for your advise. I need to open the table and update it with the text file data. If you can help please respond.
 


First get the Text file into Access.

Look at FILE|GET EXTERNAL DATA|IMPORT

There are lots of options but it is all very easy.

Then you will have the text file as a table in access.

Then you can create an append query. Check the help files if necessary.

Couldn't be easier. If you need to automate this task - it can be done through VBA or through a macro (if youre not into nerdy code)


Stew "Make good use of bad rubbish."
 
Thanks Stew,
I can import the text file or open a dialog box to read as text file and pass the value to compare in the access table. There will be several files, the users will be comparing the access table and updating. This the reason, I wanted to code using Visual Basic functions and methods. This way the dialog box will ask the text file name and user can enter as they like. At the same note I can also write a macro to import the text file into access table and then compare in the query.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top