Visual Basic 6 & Access 2000


Closed Thread
Results 1 to 34 of 34

Hybrid View

  1. #1
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default

    Thanks, that looks great.

    I'm not too keen on writing to the registry.

    Robert


    EDIT: Are you sure about this statement?

    -----------------------------------------------------
    Here's an example of reading in the language value under the Section named SAP in the Pack.ini file.

    Code:

    PstrLang = FetchProfileString(App.Path & "/PACK.INI", "SAP", "LANGUAGE", "EN")
    -----------------------------------------------------

    Why read the INI file to find sValue if you are providing it in the statement? This would look more like a Write statement no?
    Last edited by Demon; - 25th August 2006 at 16:59.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default

    This one is really off-topic.

    I'd like to copy an Access MDB file from within VB6. I don't even know where to start looking for this. I figure this could be some sort of batch file like we used to be able to do in DOS.

    Robert



    EDIT: Hmmm: http://builder.com.com/5100-6373-1050078.html CopyFile feature, interesting.
    Last edited by Demon; - 27th August 2006 at 17:26.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default

    I found this:

    FileSystemObject.CopyFile "c:\mydocuments\letters\*.doc", "c:\tempfolder\"

    But I'm stuck on how to define that FileSystemObject.

    Robert


    EDIT: Found it, I needed to add a Reference to Microsoft Scripting Runtime (scrrun.dll).
    Last edited by Demon; - 27th August 2006 at 18:19.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  4. #4
    Join Date
    Mar 2005
    Location
    Iowa, USA
    Posts
    216


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Demon
    Why read the INI file to find sValue if you are providing it in the statement? This would look more like a Write statement no?
    Look at the FetchProfileString function. You have to provide a default value in this call, then it gets overwritten with what's in the INI file.
    Last edited by Demon; - 4th October 2016 at 17:55.
    Wisdom is knowing what path to take next... Integrity is taking it.
    Ryan Miller

  5. #5
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Select Where

    How do we point to a VB6 public variable from within a SELECT statement?

    Set rsProfile = dbProfile.OpenRecordset("SELECT * FROM tblProfile WHERE ptrMenu = ptrCurrentMenu")

    Both ptrMenu (primary key) and ptrCurrentMenu are defined as LONG, but it only works when I hardcode a 1 instead of ptrCurrentMenu.

    Robert


    EDIT: Found it in Programmer's Heaven, thanks Steve: ("SELECT * FROM tblProfile WHERE ptrMenu = " & ptrCurrentMenu)
    Last edited by Demon; - 29th August 2006 at 23:51.
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  6. #6
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Null not a null

    I would have expected this IF statement to trap a Null, but apparently it doesn't work that way. The execution fell right down to the ELSE and executes the next statement. Any idea how to do make it work?

    Robert
    Attached Images Attached Images  
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

  7. #7
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Demon
    I would have expected this IF statement to trap a Null, but apparently it doesn't work that way. The execution fell right down to the ELSE and executes the next statement. Any idea how to do make it work?

    Robert
    Try "vbNull" instead. (Cant test as I dont have VB on this machine!)
    Last edited by Demon; - 4th October 2016 at 17:56.
    Keith

    www.diyha.co.uk
    www.kat5.tv

  8. #8
    Join Date
    Oct 2004
    Location
    Italy
    Posts
    695


    Did you find this post helpful? Yes | No

    Default

    Hi,

    Use the Visual Basic function IsNull().

    Best regards,

    Luciano

  9. #9
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default

    Thank you!

    Robert
    My Creality Ender 3 S1 Plus is a giant paperweight that can't even be used as a boat anchor, cause I'd be fined for polluting our waterways with electronic devices.

    Not as dumb as yesterday, but stupider than tomorrow!

Similar Threads

  1. Replies: 5
    Last Post: - 24th August 2006, 22:59
  2. Visual Basic 6 question
    By Christopher4187 in forum Off Topic
    Replies: 5
    Last Post: - 3rd July 2006, 14:06
  3. Visual Basic 6 and Pic com
    By shawn in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 15th September 2005, 06:21
  4. Output PIC module
    By freelancebee in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 12th September 2005, 21:10
  5. '877 and Visual Basic 6
    By Tomas in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 4th March 2004, 03:31

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts