Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Open Forms (access 2002 sp-3/access 2000 sp-3)

    I have a form (right now called frmTest), which I call from two different places from my frmProject. To add a record, I have a Command Button, which does the following call:

    stDocName = "frmtest"
    DoCmd.OpenForm stDocName, , , , acFormAdd, , "NEW" & [ProjectID] (I use the openargs to do some things in the Form Load). THis works fine.

    I also have a subform on the frmProjects that shows all the Orders for that project. Each order has a OrderID, which is the Primary Key. The subform is a continueous form and each record (row) has a Command Button to open the frmTest showing the data for that particular record.

    stDocName = "frmTest"
    stLinkCriteria = "[OrderID]=" & "'" & Me![OrderID] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria, , , Me.ProjectID

    This was working okay then stopped. Now when I click on the Command button, I get my frmTest but with no data (including the autonumber field I have setup in the table / form). Its is filtered to the OrderID that is in the subform but no data. The Cancel(undo) key won't work either (msg says it isn't available). I am using this type of subform / form for a couple of other table and they seem to work just fine. I do have a '-' in my fields (ie O071805MAT-45), would that create a problem? I have rewritten this form a couple of times. Seems to work for a while and then doesn't display existing records.

    Any ideas? I feel like there is something going on with filters behind the scenes.

    Alan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Open Forms (access 2002 sp-3/access 2000 sp-3)

    Can you see records if you open frmTest directly from the database window? Has the Data Enntry property of frmTest accidentally been set to Yes?

  3. #3
    Star Lounger
    Join Date
    Apr 2001
    Location
    Naperville, Illinois, USA
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Open Forms (access 2002 sp-3/access 2000 sp-3)

    Thanks! The data entry property was set to yes. I don't know how yet but it happened in two different versions of this form so there must be something that triggers it. Prehaps when I open the form with Addrec. If it continues, I will set the property to off within the code when the form opens.

    Again, thanks.

Posting Permissions

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