No worries Steve, I love VBScript, used to dislike it. I check in at 
the scriptcenter weekly now to learn something else cool, like using 
MS Agent!

Bueno suerte!
Duane.

--- In AccessDevelopers@yahoogroups.com, "Steve Dennis" 
<[EMAIL PROTECTED]> wrote:
>
> Thanks Duane!  I found what I needed and got the job done.
> A very comprehensive and helpful answer I must say!  Ta :-) 
> 
> -----Original Message-----
> From: AccessDevelopers@yahoogroups.com
> [mailto:[EMAIL PROTECTED] On Behalf Of Duane 
Hennessy
> Sent: Monday, 9 January 2006 7:20 AM
> To: AccessDevelopers@yahoogroups.com
> Subject: [AccessDevelopers] Re: Declares equivalent in VBScript?
> 
> Hi,
>  As yet VBScript still does not reference dll functions. One way 
> around this is to create ActiveX controls incorporating these dlls 
> and loading them into your VBScript :-/ . Not a elegant solution 
> though.
> 
> For VBScript and by looking at the code you've provided this page 
> may be of use to you
> 
> 
http://www.microsoft.com/technet/scriptcenter/scripts/misc/events/def
> ault.mspx
> 
> It provides VBScript for the WMI Service class.
> 
> A more inelegant solution though maybe easier to maintain is a 
> combination, load your DLLs into a word document or something with 
a 
> macro to do what you want it to do and then load the word document 
> into your VBScript routine and run the macro from there. Or create 
a 
> macro called "Public Sub autoexec()" in a module called "Main" 
> within the Word Document and put your code into the macro. When 
the 
> document opens the autoexec macro should run automatically upon 
> opening.
> 
> Beyond that you will have to look at VBScript windows services.
> 
> Here is a cool MS place to look for VBScripts where they have 
weekly 
> lessons, projects etc.
> http://www.microsoft.com/technet/scriptcenter/default.mspx
> 
> Other sites I have found are:
> http://www.dx21.com/SCRIPTING/VBSCRIPT/UDFCAT.ASP
> http://www.dx21.com/SCRIPTING/VBSCRIPT/SOR.ASP
> http://www.dx21.com/SCRIPTING/VBSCRIPT/TOOLBOX.ASP 
> http://www.thescarms.com/VBasic/wshom.asp
> http://www.devguru.com/Technologies/vbscript/quickref/objects.html
> 
> Hope this helps
> 
> Duane Hennessy.
> Bandicoot Software 
> Tropical Queensland, Australia 
> (ABN: 33 682 969 957) 
> 
> Want Increased Productivity? 
> http://www.bandicootsoftware.com.au 
> 
> --- In AccessDevelopers@yahoogroups.com, "Steve Dennis" 
> <[EMAIL PROTECTED]> wrote:
> >
> > Hi all,
> >  
> > Can anyone show me how to reference external procedures (in 
dlls) 
> using the
> > equivalent of VBA's Declare Statement, using just VBScript?  
> Specificially
> > for what I'm working on, I want the equivalent of the code 
> included below.
> >  
> > Thanks in advance!
> >  
> > **********
> >  
> > Public Const WAIT_FAILED As Long = &HFFFFFFFF
> > Public Const INFINITE As Long = &HFFFFFFFF
> > Public Const STATUS_PENDING As Long = &H103
> > Public Const STILL_ACTIVE As Long = STATUS_PENDING
> > Public Const SYNCHRONIZE As Long = &H100000
> > Public Const STANDARD_RIGHTS_REQUIRED As Long = &HF0000
> > Public Const PROCESS_ALL_ACCESS As Long = 
> (STANDARD_RIGHTS_REQUIRED Or
> > SYNCHRONIZE Or &HFFF)
> >  
> > Declare Function OpenProcess Lib "kernel32.dll" ( _
> >      ByVal dwDesiredAccess As Long, _
> >      ByVal bInheritHandle As Long, _
> >      ByVal dwProcessId As Long) As Long
> >  
> > Declare Function GetExitCodeProcess Lib "kernel32.dll" ( _
> >      ByVal hProcess As Long, _
> >      ByRef lpExitCode As Long) As Long
> >  
> > Declare Function WaitForSingleObject Lib "kernel32.dll" ( _
> >      ByVal hHandle As Long, _
> >      ByVal dwMilliseconds As Long) As Long
> >  
> > Declare Function CloseHandle Lib "kernel32.dll" ( _
> >      ByVal hObject As Long) As Long
> >  
> > ************
> > 
> >   _____  
> > 
> > From: AccessDevelopers@yahoogroups.com
> > [mailto:[EMAIL PROTECTED] On Behalf Of RAJESH 
DESAI
> > Sent: Sunday, 8 January 2006 1:52 PM
> > To: Access1; Access2; Access3
> > Subject: [AccessDevelopers] RE: [ms_access] Help with select 
> statement
> > 
> > 
> > Hi,
> >  
> > Thanks John, your solution is working perfectly for my 
requirement.
> >  
> > I want to trouble you guys a little more. I have a calculation 
> which is
> > based on values from different tables. I have acheived the 
desired
> > calculation, but I am unable to round the results as per my 
> requirement.
> > What I want is if the fraction is less than or equal to 0.5 then 
I 
> want only
> > the whole number. If the fraction is greater than 0.5 then I 
want 
> the number
> > to be XX.50. To explain it further please refer below examples.
> >  
> > Calculated Number               Desired Number
> > 1.45                                       1.00
> > 1.85                                        1.50
> > 2.99                                        2.50
> > 3.05                                        3.00
> >  
> > In excell we have Floor function whith which we can achieve 
this. 
> But how to
> > do this in
> > access. I have searched the access as wll as VBA help, but Floor 
> function is
> > no where to be found. Please help me in this.
> >  
> > Keep up the good work.
> >  
> > Thieves Can't steal it,
> > Relatives Can't snatch it,
> > Time Can't depreciate it,
> > Knowledge is the Only Treasure
> > that multiplies when you distribute it.
> > (Famous Sanskrit Verse)
> >  
> > Thanks,
> >  
> > Rajesh
> > John Viescas <[EMAIL PROTECTED]> wrote:
> > 
> > Rajesh-
> > 
> > You cannot assign a SELECT statement to an integer variable - 
that 
> should
> > give you an error. You must either open a recordset or use 
DLookup 
> to fetch
> > the value.
> > 
> > LeaveYearID = DLookup("ID", "tblLeaveYearMaster", _
> > "Year = " & Me.LeaveYear)
> > 
> > Also, you have declared LeaveYearID as a local variable. The 
above 
> should
> > assign the ID of the record to that variable, but the variable 
is 
> destroyed
> > as soon as the Sub ends. Do you really mean to set a control on 
> the form?
> > If so, don't declare the variable, and reference the control as
> > Me.LeaveYearID.
> > 
> > John Viescas, author
> > "Building Microsoft Access Applications"
> > "Microsoft Office Access 2003 Inside Out"
> > "Running Microsoft Access 2000"
> > "SQL Queries for Mere Mortals"
> > http://www.viescas.com/
> > 
> > 
> > -----Original Message-----
> > From: ms_access@yahoogroups.com 
[mailto:[EMAIL PROTECTED] 
> On Behalf
> > Of RAJESH DESAI
> > Sent: Thursday, January 05, 2006 12:05 PM
> > To: Access1; Access2; Access3
> > Subject: [ms_access] Help with select statement
> > 
> > Hi,
> > 
> > Please refer the following code. I have put this code in the 
code 
> window
> > of the form which is bound to tblEmployeeMaster.
> > 
> > What I basically want is, from the year entered in the form by 
the 
> user, I
> > want to pick the YearID from tblLeaveYearMaster. "ID" is a PK of 
> data type
> > AutoNumber and Year is of data type long integer.
> > 
> > On running the following code, no matter what the year is 
selected 
> in the
> > form, it invariably store value 0 in LeaveYearID variable.
> > 
> > Please guide me.
> > 
> > 
> > Private Sub Form_AfterUpdate()
> > 
> > LeaveYearID As Integer
> > 
> > Dim dbs As Database
> > Set dbs = CurrentDb
> > 
> > Months = NoOfMonths(Fdate, LDate, DOJ, DOD)
> > 
> > LeaveYearID = "Select tblLeaveYearMaster.ID from 
> tblLeaveYearMaster " _
> > & " WHERE tblLeaveYearMaster.Year = " & LeaveYear
> > 
> > dbs.Close
> > End Sub
> > 
> > Regards,
> > 
> > Rajesh Desai
> > 
> > 
> > ---------------------------------
> > Yahoo! Photos
> > Ring in the New Year with Photo Calendars. Add photos, events, 
> holidays,
> > whatever.
> > 
> > [Non-text portions of this message have been removed]
> > 
> > 
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >   _____  
> > 
> > Yahoo! Photos
> > Ring in the New Year with Photo
> > 
> 
<http://us.rd.yahoo.com/mail_us/taglines/photos/*http://pa.yahoo.com/
> *http:/
> 
> /us.rd.yahoo.com/mail_us/taglines/photos/evt=38087/*http://pg.photo
> s.yahoo.c
> > om/ph//page?.file=calendar_splash.html&.dir=> Calendars. Add 
> photos, events,
> > holidays, whatever. 
> > 
> > 
> > Please zip all files prior to uploading to Files section. 
> > 
> > 
> > 
> > 
> > SPONSORED LINKS 
> > Microsoft
> > <http://groups.yahoo.com/gads?
> t=ms&k=Microsoft+access+developer&w1=Microsoft
> > 
> 
+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databa
> se&w4=M
> > 
> 
icrosoft+access+training&w5=Microsoft+access+training+course&w6=Micro
> soft+ac
> > cess+programming&c=6&s=193&.sig=d-CjBIrYOH9NCKHYFeGZJA> access 
> developer
> > Microsoft
> > <http://groups.yahoo.com/gads?
> t=ms&k=Microsoft+access+help&w1=Microsoft+acce
> > 
> 
ss+developer&w2=Microsoft+access+help&w3=Microsoft+access+database&w4
> =Micros
> > 
> 
oft+access+training&w5=Microsoft+access+training+course&w6=Microsoft+
> access+
> > programming&c=6&s=193&.sig=crx-d4AAhdklv_VozGVAUw> access help 
>       Microsoft
> > <http://groups.yahoo.com/gads?
> t=ms&k=Microsoft+access+database&w1=Microsoft+
> > 
> 
access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databas
> e&w4=Mi
> > 
> 
crosoft+access+training&w5=Microsoft+access+training+course&w6=Micros
> oft+acc
> > ess+programming&c=6&s=193&.sig=qg2hDuQNweByMCX0NU7cEA> access 
> database      
> > Microsoft
> > <http://groups.yahoo.com/gads?
> t=ms&k=Microsoft+access+training&w1=Microsoft+
> > 
> 
access+developer&w2=Microsoft+access+help&w3=Microsoft+access+databas
> e&w4=Mi
> > 
> 
crosoft+access+training&w5=Microsoft+access+training+course&w6=Micros
> oft+acc
> > ess+programming&c=6&s=193&.sig=bLZHqTqWUQny609X1OkmNA> access 
> training
> > Microsoft
> > <http://groups.yahoo.com/gads?
> t=ms&k=Microsoft+access+training+course&w1=Mic
> > 
> 
rosoft+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+
> databas
> > 
> 
e&w4=Microsoft+access+training&w5=Microsoft+access+training+course&w6
> =Micros
> > oft+access+programming&c=6&s=193&.sig=d8GQXfQW3RZ64rOfzIMo8A> 
> access
> > training course     Microsoft
> > <http://groups.yahoo.com/gads?
> t=ms&k=Microsoft+access+programming&w1=Microso
> > 
> 
ft+access+developer&w2=Microsoft+access+help&w3=Microsoft+access+data
> base&w4
> > 
> 
=Microsoft+access+training&w5=Microsoft+access+training+course&w6=Mic
> rosoft+
> > access+programming&c=6&s=193&.sig=iXDlL79-kkgjv6fLyFu3Sg> access 
> programming
> > 
> > 
> >   _____  
> > 
> > YAHOO! GROUPS LINKS 
> > 
> > 
> >     
> > *    Visit your group "AccessDevelopers
> > <http://groups.yahoo.com/group/AccessDevelopers> " on the web.
> >   
> > 
> > *    To unsubscribe from this group, send an email to:
> >  [EMAIL PROTECTED]
> > <mailto:[EMAIL PROTECTED]
> subject=Unsubscribe> 
> >   
> > 
> > *    Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
> Service
> > <http://docs.yahoo.com/info/terms/> . 
> > 
> > 
> >   _____
> >
> 
> 
> 
> 
> 
> 
> 
> Please zip all files prior to uploading to Files section. 
> Yahoo! Groups Links
>







Please zip all files prior to uploading to Files section. 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AccessDevelopers/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to