Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185

    Unbound Form Recordset in 2007 Edition

    Hi Folks,
    in fact I have two questions in this thread:
    1- I'm making an unbound form which I get its data from a back-end db by ADO in a recordset named objRST each time I select a data from a combo box in my form, the recordset statement is as follow:
    Code:
    objRST.Open strSQL, objConn, adOpenStatic, adLockOptimistic
    the problem is I can not do edit on form's data

    2-I have an attachment field in my form, when I do the steps in part 1 (above) it doesn't show the file in the related control
    Thanx in advance
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    12,528
    have you understood what the parameters are in your .open method
    "openstatic" means precisely that
    Id recommend you change to adopendynamic or adopenkeyset
    if you are using unbound recordsets then you have to do the work in populating controls AND making certain changes are posted back tot he DB. bound controls do a heck of a lot for you, but there are not the solution for all/many situations, unbound controls are a great way of dealing with forms, but you loos most of the whizzy bits from the Access IDE.

    yer pays yer money, yer takes yer choice
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185
    ooooops I forgot that, but I change it to adopendynamic and receive following error: error 7965 the object you entered is not a valid recordset property
    and the adopenkeyset doesn't change anything I mean the controls are still un editable!
    what about the secon part of my thread? do you have any idea?
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

  4. #4
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185
    Any Other Idea?
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

  5. #5
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Since you have provided no information other than one single line of code, it's of course, impossible to diagnose your first problem.

    The attachment should be a string representing the path to the attached file. The user should take an action to view the content of the attachment in its native editor... imo.

    It's also better to put one problem per thread.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  6. #6
    Join Date
    Sep 2007
    Location
    Global Village
    Posts
    185
    O.k Hands Up I'm interesting in my second question Star.
    What I think is when you open the recordset based on back-end db and set the Unbound form's recordset to that it shall show the file attached to the attachement field in the form like other controls, but it doesn't with no error
    I even tried to set the attachement control value to the relevant value in recordset
    Code:
    Me!Attachment147 = objRST![Document file]
    and get this error: error438 object doesn't support this property or method
    <<Never Walk on the Traveled Path, Because it only Leads you to where the Others have been.>>
    Graham Bell

Posting Permissions

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