Results 1 to 3 of 3
  1. #1
    stephenaa5 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    72

    Referencing split form data / filter

    Hello, all.


    Is it possible to reference the choices made on a split form for use in a query?

    Once a user winnows down the data to what they'd like to see, I would like to be able to use that data for other purposes (namely mapping.) The mapping part is worked out, it is just a matter of referencing the data set.

    Any ideas? Thank you in advance.

    Stephen.

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    One can reference a unique control. In a continuous form unique controls are in the header/footer of the form - but there isn't a unique control in the detail because the records are multiple. But if the user is in the form and tabbing or entering data inside one record you can use that event to write the value to an unbound unique control up in the header - and then reference that control.

    hope that helps.

  3. #3
    stephenaa5 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Oct 2009
    Posts
    72

    Using data from a split form- SOLVED

    I've been unable to figure out how to actually use the choices made in parsing the data in a split form. The following code at least kicks it out to an Excel file, which makes it useable. I'm posting it here because, while not a normal application, at least provides some options for folks to think about. The trick is that it has to go through a report that's filtered by the split form, and then the report has to be output before the report closes. There may be other ways to do this, along the same line, but this solved my problem.

    The only problem I'm now having is that the lower part of the code (the mapping part) gives a runtime error. Runs fine on full version of access, but runtime causes issues. Any thoughts? I'll repost this as a new question.

    ------------------------------------------------------
    Stephen.

    Private Sub Command406_Click()
    DoCmd.Openreport "mapreport", acViewPreview, , Me.Filter, acHidden
    DoCmd.OutputTo acOutputReport, "mapreport", acFormatXLS, "c:\map\mapfile.xls"
    DoCmd.Close acReport, "mapreport"


    Dim objApp As New MapPoint.Application
    Dim objMap As MapPoint.Map
    Set objMap = objApp.ActiveMap
    objApp.Visible = True
    objApp.UserControl = True
    Dim oDS As MapPoint.DataSet
    With objApp.ActiveMap.DataSets
    Set oDS = .ImportData("c:\map\mapfile.xls", , geoCountryUnitedStates, , geoImportExcelSheet)

    End With

    objMap.DataSets.ZoomTo

    End Sub

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 2
    Last Post: 11-25-2013, 10:56 AM
  2. Form - Filter on load (if data exists)
    By dilbert in forum Forms
    Replies: 0
    Last Post: 08-13-2010, 11:39 AM
  3. Replies: 3
    Last Post: 06-23-2010, 02:02 PM
  4. Replies: 1
    Last Post: 04-27-2010, 09:30 PM
  5. Referencing table data in field validation rule
    By toad848 in forum Database Design
    Replies: 3
    Last Post: 03-19-2009, 07:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums