Results 1 to 3 of 3
  1. #1
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453

    code error is calling a form

    Hi

    yet another head banger problem

    in the attatched datbase if I open the form frm_westbury

    then press the button "All Baptisms"

    my results form appears

    If I click on a the Surname field then a details form appears

    All perfect.

    This code works

    Code:
    Private Sub Surname_Click()
    DoCmd.OpenForm "frm_WestburyBaptismDetail", , , "BirthID = " & Me.BirthID
    End Sub

    If I return to the opening form and press the All marriages button

    then my results form appears

    If again I click on the Surname hyperlink

    I get a perameter box appear.

    I've compared the code between the two forms and see nothing wrong

    THis code does not work

    Private Sub Surname_Click()
    DoCmd.OpenForm "frm_WestburyMarriageDetail", , , "MarriageID = " & Me.MarriageID


    End Sub[/CODE]

    Can some nice person take a look


    thanks

    Ian
    Attached Files Attached Files

  2. #2
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    There's no [MarriageID] field in qry_WestburyMarriageDetail. Simply add it in query design.

  3. #3
    Jen0dorf is offline Competent Performer
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    UK
    Posts
    453
    Hi

    many thanks - egg on face, just goes to show a fresh paor of eyes works wonders

    cheers

    Ian

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

Similar Threads

  1. Replies: 2
    Last Post: 08-20-2014, 04:36 AM
  2. runtime error 49 bad dll calling convention
    By mujaqo in forum Programming
    Replies: 8
    Last Post: 01-14-2014, 06:00 AM
  3. Calling Error
    By drunkenneo in forum Programming
    Replies: 6
    Last Post: 09-12-2013, 01:32 PM
  4. Calling and exe from code
    By drunkenneo in forum Access
    Replies: 1
    Last Post: 09-03-2013, 05:45 AM
  5. Syntax Error while calling sub: Expected: =
    By cowboy in forum Programming
    Replies: 3
    Last Post: 07-12-2010, 02:21 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