User Profile

Collapse

Profile Sidebar

Collapse
kentgorrell
kentgorrell
Last Activity: May 23 '24, 05:32 AM
Joined: Jul 26 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • kentgorrell
    replied to Escaping punctuations and quotes
    You are right CHR$(34) can be easier than trying to keep count of the double quotes.
    See more | Go to post

    Leave a comment:


  • kentgorrell
    replied to How to Generate a User List
    Does this only list users who are using the same front end MDB? Or will it list users who are using separate front end MDBs linked to the same backend MDB?
    See more | Go to post

    Leave a comment:


  • kentgorrell
    replied to Escaping punctuations and quotes
    In Jet (Access) you should be able to contain a string between double quotes - three each side. eg
    strSQL = "SELECT * FROM tblNames WHERE Last_Name = """ & strName & """;"
    You see when you use the three quotes you end up with one. You may like to see the result by inserting debug.print strSQL to print the string to the immediate window. it should look like
    SELECT * FROM tblNames...
    See more | Go to post

    Leave a comment:


  • kentgorrell
    replied to Save image in database
    To store an image from a file use this -
    [code=VB]Dim cn As ADODB.Connectio n, rs As ADODB.Recordset , SQL As String
    Dim ps As New ADODB.Stream
    ps.Type = adTypeBinary

    Set cn = New ADODB.Connectio n
    Set rs = New ADODB.Recordset
    cn.CursorLocati on = adUseServer
    cn.Open "dsn=SQLDatabas e"

    SQL = "SELECT * FROM Student WHERE Student_ID = " & 1002
    rs.Open...
    See more | Go to post
    Last edited by Killer42; Jul 30 '07, 10:16 PM. Reason: Added [CODE=vb] tags

    Leave a comment:


  • kentgorrell
    replied to Contains IF function
    'iif' is used in access whereas 'if' is used in excel for if you are referring to a cell in excel it would be if(A1=x,do this, do the other)
    in access it is exactly the same except that you would use iif.
    See more | Go to post

    Leave a comment:


  • kentgorrell
    replied to VB.NET: Images in DataTable
    in .NET
    Have a look at this -
    http://www.eggheadcafe.com/articles/20050911.asp
    might just be what you need....
    See more | Go to post

    Leave a comment:


  • What is hDC when Displaying DIBs in an Access form

    Further to an earlier post I have made progress and can now display a DIB (Device Independent Bitmap) on a VB6 form using this code.
    [CODE=vb] Set Field = Adodc1.Recordse t.Fields.Item(" Student_Photo")
    If IsNull(Field.Va lue) = False Then
    ByteArray() = Field.Value
    hSizeIn = Field.ActualSiz e
    'Copy the memory inside the Gobal memory
    hMemIn = GlobalAlloc(GME M_SHARE,...
    See more | Go to post
    Last edited by Killer42; Jul 30 '07, 02:27 AM. Reason: Added [CODE=vb] tag

  • kentgorrell
    replied to Adding Pictures
    I don't fully understand what you want to do.
    Do you want the user to be able to find a file, if so you would use the find file dialog?
    Do you want to store that image in a database field? In which case you would store it as a BLOB and I can give you a simple little piece of code to do that. or
    Do you want to just store the path to the image? and then just point the source of an image control to it.
    See more | Go to post

    Leave a comment:


  • A function can only return a single value but if you were to concatenate the two values that you want to return eg-
    value1 & ", " & value2
    so if you pass in (x, y) and you get back "24, 25" - note the result will be a string.
    See more | Go to post

    Leave a comment:


  • Thanks for that - it helped to clarify what was happening with the reading in and out of the BLOB using GetChunk but it didn't help with the DIB specific display, specifically this line -
    DrawDibDraw(hDi bOpen, Picture1.hDC, 0, 0, xSize, ySize, BInfoHeader, ByVal pMem, 0, 0, BInfoHeader.biW idth, BInfoHeader.biH eight, 0)
    That uses the picture.hDC that is in VB6 but not in Access VBA
    Do you know what this is, or if there is an Access...
    See more | Go to post

    Leave a comment:


  • Picture controls, Access Image controls, DIBS and BLOBs

    I had a wonderful time working out how to read and write BLOBs using GetChunk until I found the new streaming object in ADO 2.6 very easy.
    Now I am confronted with DIBs
    The code I have is VB6 but only partial so I can't actually run it. Anyhow I need to get it to work in Access but there are a couple of properties and methods of the picture control in VB6 that don't have corresponding ones in Access. Like TwipsPerPixel which I can just...
    See more | Go to post
No activity results to display
Show More
Working...