Using VB.Net as a front end to Access? (1 Viewer)

BukHix

Registered User.
Local time
Today, 08:06
Joined
Feb 21, 2002
Messages
379
Has anybody started programming VB.Net as a front end for Access? I have an application where I am currently doing just that.

I have some code in a current Access form that I would like to make work in my VB form but I am not sure how to do it. For instance running a query or transferring a spreadsheet.

I am guessing that I am going to have to give up all built in Access functions and rewrite them in SQL statements. Is that the case?
 

Travis

Registered User.
Local time
Today, 05:06
Joined
Dec 17, 1999
Messages
1,332
Windows or Web? (Client based vs Server based)

What are the functions that you are trying to use?
 

BukHix

Registered User.
Local time
Today, 08:06
Joined
Feb 21, 2002
Messages
379
Windows with the database set on a network drive and VB as the front end on each client machine. Mainly I am looking for ways to run a few queries in a row.

Or say I wanted to do something like this from within my VB app
Code:
     DoCmd.TransferSpreadsheet(acImport, 8, _
            "Jobs", "C:\path\file.xls", False)

Should I be looking at pure SQL for the Queries and VB.Net for replacements to the DoCmds?
 

RichMorrison

Registered User.
Local time
Today, 07:06
Joined
Apr 24, 2002
Messages
588
BukHix wrote
<<
Should I be looking at pure SQL for the Queries and VB.Net for replacements to the DoCmds?
>>

In a word, "yes".

An ASP.Net front end, in VB.Net or any other language, can use an Access MDB for back end data. But any queries, forms, modules, etc that you developed in Access are gone, gone, gone.

RichM
 

Travis

Registered User.
Local time
Today, 05:06
Joined
Dec 17, 1999
Messages
1,332
Richard,

Not all of the code is usless only the code that uses intrensic access commands (Such as Docmds). DoCmds are Access Menu commands (Meaning if there is a menu Item to do it then there is a DoCmd)

For your exporting to an Excel file you will need to look into alternatives. Such as the OPEN...PRINT method or actually using the Excel Object to create an Excel file. Also there are report Engines out there that can open reports in various formats (Such as an Excel file or PDF). Currently I'm experimenting with ComponentOne's Report Engine. It is very promissing.
 

BukHix

Registered User.
Local time
Today, 08:06
Joined
Feb 21, 2002
Messages
379
Thanks for the additional information Travis. I have got a pretty good start on some of my SQL code by using the Access Query Wizard to do what I want and the using the SQL view to cut and paste the code. Of course I have to modify some of it to make it work but that is made a lot easier when I have a sample SQL statement.
 
Last edited:

RichMorrison

Registered User.
Local time
Today, 07:06
Joined
Apr 24, 2002
Messages
588
Travis,

Yes I suppose you could copy some Access Basic code into a VB.Net module. It's quicker than typing.

RichM
 

Users who are viewing this thread

Top Bottom