Access Form Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chiggler
    New Member
    • Nov 2006
    • 2

    #1

    Access Form Help

    I have an access form that combines the information from several tables. In one section of that form it has all my submitter info and an add/edit button. When the user hits that button I want it to take that user to the same record on the submitter form.

    Currently I am using this and it is not working it just take me to a blank submitter form..

    DoCmd.OpenForm "frmSubmitt er", , , "[SB_PK] = " & Me.SBInfo, , acDialog
  • MSeda
    Recognized Expert New Member
    • Sep 2006
    • 159

    #2
    it may be the "data entry" property of frmSubmitter is set to yes. This would cause the form to always open to a new record.
    Also I usually use a slightly different syntax in the where statement try:

    DoCmd.OpenForm "frmSubmitt er", , , "[SB_PK] ='" & Me.SBInfo & "'", acFormEdit, acDialog

    Comment

    • chiggler
      New Member
      • Nov 2006
      • 2

      #3
      Originally posted by MSeda
      it may be the "data entry" property of frmSubmitter is set to yes. This would cause the form to always open to a new record.
      Also I usually use a slightly different syntax in the where statement try:

      DoCmd.OpenForm "frmSubmitt er", , , "[SB_PK] ='" & Me.SBInfo & "'", acFormEdit, acDialog
      I did have the data entry set to No, However you were right about the code. There was something that it obviously did not like in my code. Your example worked great thank you so much for your help. I find it definately helps to have a fresh pair of eyes on your project from time to time :)

      Have a great day.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32669

        #4
        MSeda's code put quotes around the value.
        If [SB_PK] is a string / text field then they are required (your original code had omitted them).
        MSeda looks like they're starting to post some helpful answers - keep it up - all help is appreciated.

        Comment

        Working...