Results 1 to 4 of 4
  1. #1
    DCTerp is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jan 2019
    Posts
    7

    OpenForm Macro to open record from subform in a dialog box form

    I'm trying to create the where clause for this, but I'm having trouble.

    My situation is, I have a form (frmViewProvider) with a subform (subfrmNotes) in datasheert view on it. Upon clicking on the primary key (NoteID) on the subform, I'd like the form formViewNote to open dialog.



    Here's what I've tried

    Where = ="[NoteID]=" [Tables]![tblNotes]![NoteID]

    I'm sure it would be easier in VBA, but I've barely scratched the surface to with VBA, so a Macro seems easier to me.

    What am I doing wrong?

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    use the BUILDER, it will guide you thru the objects on the screen:

    docmd.openform "frmViewNote", , ,
    "[NoteID]=" & forms!frmViewProvider!subfrmNotes.form.NoteID



  3. #3
    DCTerp is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jan 2019
    Posts
    7
    Ugh...unfortunately, that didn't work.

  4. #4
    DCTerp is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Jan 2019
    Posts
    7
    I found this, for the where condition

    ="[NoteID]=" & Nz([NoteID],0)

    But this just opens a blank form frmViewNote

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

Similar Threads

  1. Replies: 19
    Last Post: 01-03-2017, 02:23 PM
  2. Replies: 1
    Last Post: 12-14-2015, 05:32 PM
  3. Print current record, open printer dialog box
    By Jamesiv1 in forum Access
    Replies: 7
    Last Post: 05-19-2014, 11:15 AM
  4. Replies: 2
    Last Post: 10-09-2013, 05:45 PM
  5. Web Database: OpenForm Macro to Specific Record
    By besuchanko in forum Macros
    Replies: 3
    Last Post: 07-25-2013, 12:17 PM

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