Results 1 to 2 of 2
  1. #1
    rmohebian is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Feb 2011
    Posts
    16

    Button and form Issues


    Hello All,
    I have a form which has a drop down list of student names and two text boxes which take a start date and end date. I also have a command button. I want this form to open up another form I have created which consists of complete student information and cheque info displayed in a subform to open showing the info for the selected student name and I want the starting date and ending date to reflect the subform. I can use a macro to open up the desired form but I cannot display the selected record. Can someone help me with this,never done any vb coding so pretty new to all this parameter passing?

  2. #2
    dwaterman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Location
    Elkhart, IN
    Posts
    22
    I think you want to link the field they have in common. Try this code to open the form:

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "your form name here"

    stLinkCriteria = "[your link field name in new form] = " & "'" & Me![your link field in open form] & "'"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

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

Similar Threads

  1. Printing form record issues
    By rmohebian in forum Access
    Replies: 3
    Last Post: 03-06-2011, 02:33 PM
  2. Printing form record issues
    By rmohebian in forum Forms
    Replies: 0
    Last Post: 03-03-2011, 01:17 PM
  3. Issues with Continues form
    By ducecoop in forum Access
    Replies: 3
    Last Post: 11-11-2010, 01:18 PM
  4. Setfocus Split Form Issues
    By cksm4 in forum Programming
    Replies: 6
    Last Post: 10-13-2010, 02:46 PM
  5. Help with multiple form issues
    By AKQTS in forum Forms
    Replies: 0
    Last Post: 08-18-2010, 07:57 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