Results 1 to 4 of 4
  1. #1
    jo15765's Avatar
    jo15765 is offline Expert
    Windows XP Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672

    Blank Form

    I have an a textarea, which allows for a double click, and when double clicked will launch a secondary form passing a userid. That userid is then passed to a query, which will run and return data to the secondary form as the control source. This works 99% of the time, but in the rarity the secondary form will be blank, and I can not discover why!



    These are the basics that may (or may not) help diagnose what is causing my problem.
    Code:
    Private Sub grrrrrr_DblClick()
      Dim cid As Integer
      cid = List0
      gCurrentIndex = List0.ListIndex
      DoCmd.OpenForm "form2", acNormal, , "masterinfo.employeeID=" & cid
      DoCmd.Close acForm, "form1", acSaveNo
    End Sub
    And the basics for form2
    --getuserinfo is a query which returns data for id 9999 just the form is blank?
    RecordSource = getuserinfo
    Filter = masterinfo.employeeID = 9999

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    It seems the Filter you are applying to the Form produces zero records.

  3. #3
    jo15765's Avatar
    jo15765 is offline Expert
    Windows XP Access 2000
    Join Date
    Nov 2010
    Location
    6 Feet Under
    Posts
    672
    Quote Originally Posted by ItsMe View Post
    It seems the Filter you are applying to the Form produces zero records.
    But it should produce records. As if I manually run the query that the form is based off of the query returns the relevant data set.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    Well, you could open the form without the Filter criteria and display the value of cid in a msg box. Then you could use the Right Click Context Menu to apply the value displayed in the msgbox to the form's Filter property.

    Code:
    Dim cid As Integer
    cid = List0
    MsgBox cid
    gCurrentIndex = List0.ListIndex
    '  DoCmd.OpenForm "form2", acNormal, , "masterinfo.employeeID=" & cid
    DoCmd.OpenForm "form2", acNormal
    DoCmd.Close acForm, "form1", acSaveNo

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

Similar Threads

  1. Replies: 2
    Last Post: 11-22-2015, 07:24 PM
  2. How to see if all fields of the form are blank.
    By behnam in forum Programming
    Replies: 5
    Last Post: 06-07-2014, 10:21 AM
  3. Replies: 6
    Last Post: 09-02-2012, 04:30 PM
  4. Blank form
    By markyboy171 in forum Programming
    Replies: 2
    Last Post: 08-03-2012, 07:46 PM
  5. Replies: 2
    Last Post: 07-26-2011, 08:26 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