Results 1 to 4 of 4
  1. #1
    jonny dexter is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2010
    Posts
    7

    getting date from a subform

    i need to put a button on a tabcontrol which holds a subform.
    when this button is clicked i would like it to return a value from the currently selected record in the subform (datasheet view)



    How do i reference the selected record data ?

    the column on the subform i need the data from is called date.

    as the subform is on the current tabctrl page i was trying

    Me.[Date].value and Me!subjuly.Date.Value

    but i am getting an error back.

    also could someone clarify the difference between the following

    Me.subjuly and Me!subjuly ?

    and why we would use

    Me!subjuly.Form - does difference does the .form on the end make?

    Is there anyway to get the IDE to show the values of these types of references whilst hovering over them ?

    thanks in advance

  2. #2
    Join Date
    May 2010
    Posts
    339
    Allen Browne answers the Me. or Me! question here Bang vs Dot

  3. #3
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    if the subform is displaying single records then the syntax is:
    Me.SubformName.Form!TextBoxName

    Form is literal

    but if the subform is continuous mode showing lots of records this can't work because there are multiple records with the same control name.

  4. #4
    jonny dexter is offline Novice
    Windows XP Access 2000
    Join Date
    Jul 2010
    Posts
    7
    thanks for the links and help, i have read them through and hopefully some of it sunk in!

    om sure ill be back shortly with afew more questions as i have a couple of issues at the moment but i like to try a few things before posting.

    thanks again.

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

Similar Threads

  1. Pass Subform filter to subform in report
    By camftm in forum Programming
    Replies: 16
    Last Post: 07-19-2011, 07:12 AM
  2. Replies: 1
    Last Post: 07-07-2010, 04:22 PM
  3. Set date field on subform to date variable
    By laavista in forum Access
    Replies: 4
    Last Post: 06-30-2010, 06:32 PM
  4. Data from one subform to anther subform
    By scotribs in forum Forms
    Replies: 3
    Last Post: 03-09-2010, 09:53 AM
  5. Replies: 1
    Last Post: 12-10-2005, 04:52 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