Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2003
    Posts
    42

    Unanswered: Question to Izzy

    A while back you went over the combo box and an unbound form selection which pulls the data back over to the mainform.

    I think I am missing a second step here:

    Theres a button on the main table which does this:

    private sub Command271_Click()
    dim dabs as dao.database
    dim recs a dao.recordset
    dim imHere as long
    set dabs = currentdb
    set recs = dabs.openrecordset("04-ReqList ")

    There must be a second step to this part..is there a button on the unbound form for this part or does it do this on open? I cant see how it could all be one macro because you need a way to get from main form to the unbound one and back again. This is the second part.

    recs.addnew
    recs! LF-FN = [LNFN].value
    imHere = recs!RQID
    recs.update

    This looks like a third piece once you get back to the main form.

    forms![00_02-CRWorksheet]![RequestorBox].requery
    forms![00_02-CRWorksheet]![RequestorBox].value = imHere
    end sub

    I will fiddle with this some more.

  2. #2
    Join Date
    Jul 2003
    Posts
    42

    new

    Okay. I tried putting the Open Form button on the mainform as an open to the unbound form. Then I put the button with the code on the unbound form. Theres a FIBbox & Button with this code right now but it doesnt like some of the text:

    private sub Command271_Click()

    dim dabs as dao.database

    dim recs a dao.recordset
    - Didnt work, so I tried "dim recs AS dao.recordset" and it did work, not sure if that will give me the same result -

    dim imHere as long

    set dabs = currentdb

    set recs = dabs.openrecordset("04-ReqList")

    recs.addnew

    recs! LNFN = [LNFN].value
    -It died on this one. Not sure what I am doing wrong. The box to enter into on the unbound form is called "LNFN", the field in the [04-Reqlist table] to give the value to is "LNFN" as well to make it simple.

    (Dont know about the below items yet until I get the above error corrected.)

    imHere = recs!RQID

    recs.update

    forms![00_02-CRWorksheet]![RequestorBox].requery

    forms![00_02-CRWorksheet]![RequestorBox].value = imHere

    end sub

Posting Permissions

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