PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
VB script for connection to DB
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook Form Programming
VB script for connection to DB
![]() |
VB script for connection to DB |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
I have managed to cobble together a forn in outlook that sends the contents of the text boxes on that form to an access DB. However, i used VBA to do this from the outlook send button. I dont want to do this in the final version i want a button on the form that does it, however it has to be done in VB script. Can anyone help with the translation this is the vba code that i used. Set wrkjet = CreateWorkspace("", "admin", "", dbUseJet) Set dbs = wrkjet.OpenDatabase(fname, True) sql = "INSERT INTO tbl_vacancies ( Date_Notified, [Location Name], " sql = sql & "[Bus_Stream], [Job Title], [Hours], [Num_of_posts] ) " sql = sql & "SELECT #" & Date & "# AS Expr1,""" & frm_values(3) & """ AS Expr2, """ sql = sql & frm_values(5) & """ AS Expr3, """ & frm_values (1) & """ AS Expr4,""" sql = sql & frm_values(2) & """ AS Expr5, """ & frm_values (4) & """ AS Expr7;" dbs.Execute sql dbs.Close TIA Nathan. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
In article <433e01c4903c$61dc6dd0$a601280a@phx.gbl>, Nath wrote:
> I have managed to cobble together a forn in outlook that > sends the contents of the text boxes on that form to an > access DB. However, i used VBA to do this from the > outlook send button. I dont want to do this in the final > version i want a button on the form that does it, however > it has to be done in VB script. Can anyone help with the > translation > Go to www.outlookcode.com and look for an example. There should also be examples on www.slipstick.com. Hollis D. Paul [MVP - Outlook] Hollis@outhousebythesound.com Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600 http://search.support.microsoft.com...D=TECH&LN=EN-US Mukilteo, WA USA |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

