Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    184

    Unanswered: Unbound forms? How to?

    I would like to create an unbound form using DAO. So for me to create an unbound form. I would create a form without choosing a table, open a DAO recordset and then set the ControlSource of the objects on the form to that recordset like follows?

    Dim rs as DAO.Recordset

    set rs = new DAO.Recordset

    Set rs = database.OpenRecordset(strSQL, RecordsetType, RecordsetOptions, LockType)

    set TextBox.ControlSource = rs

    Thank you for any help.
    In abundance of water only the fool is thirsty. Bob Marley.

  2. #2
    Join Date
    Nov 2003
    Posts
    23
    If the form is unbound so are the controls in which case you will have to assign the values from your recordset to each of the controls.

    fe.

    me.text1 = myRS("Property Name")
    me.text2 = myRS("Address Line 1")

    or you could try specifying the record source of the form before the control source of each object.

Posting Permissions

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