Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Adding VB Script File to MS Access


Adding VB Script File to MS Access

Reply
  #1 (permalink)  
Old 09-11-09, 01:29 AM
Johnwho1234 Johnwho1234 is offline
New Member
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Adding VB Script File to MS Access

Hi there
I'm actually using an application developped in C, VB with an Ms Access database. But I would like to add .txt scripts to the program for additional information. The sttyle of the script is somethig like that

Code:
SUB PROCESS_ONLOAD
    Dim %M50
 
    FormMaximized
 
ENDSUB
 
SUB PROCESS_SAVE
    Dim %M10 
    Dim %T1(10,10)
 
 
    %M1 = "{#=CRM - Equipment.Delivered Date}"
    %M5 = "{#=CRM - Equipment.Warranty Period}"
 
    if %M5 = "1" then
        %M2 = format$({#=%M1},"dd/mm/yyyy")
        %M3 = dateadd$({#=%M2},+12,"m")
    endif
 
    if %M5 = "1.5" then
        %M2 = format$({#=%M1},"dd/mm/yyyy")
        %M3 = dateadd$({#=%M2},+18,"m")
    endif
 
    if %M5 = "2" then
        %M2 = format$({#=%M1},"dd/mm/yyyy")
        %M3 = dateadd$({#=%M2},+24,"m")
    endif
 
 
    %M4 = OBJECT.UPDATE [CRM - Equipment.Maintenance Due]='{#=%M3}' WHERE T_OBF_OB_Code='{#=%REF}'
 
ENDSUB
Could anyone out there tell me where this type of script writing could be learnt from.

Many thanks guys for your quick answer

Last edited by digioz; 09-11-09 at 07:31 AM. Reason: Please use code tags
Reply With Quote
  #2 (permalink)  
Old 09-11-09, 07:38 AM
digioz's Avatar
digioz digioz is offline
Community VIP
 
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
Well, you have a few choices:

1. Add your script to a new Macro inside the MS Access Database.
2. Add your script to your Visual Studio Project as a Module.

Pete
__________________
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Raffle/Lottery Script (Very profitable!), Coded it myself. Voltaire General Advertisements 6 03-16-09 07:15 AM
MS Access Form Buttons Broke?! davie_gravy Database 0 01-22-08 01:44 PM
Submit button....can it send info to my email w/out the use of php???? lisa33 HTML/XHTML/XML 7 10-17-06 11:46 AM
HTML code file update on the webserver using CGI script sujata_ghosh Perl 31 07-06-06 03:06 AM
Looking for file upload script austinpctech Script Requests 3 06-11-06 11:26 AM


All times are GMT -5. The time now is 01:18 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.