Results 1 to 2 of 2

Thread: Access Forms Help

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2001
    Location
    India
    Posts
    203

    Access Forms Help

    I need to make a form in access with the usual text controls and 3 buttons : Add Modify and Delete... I have done this kind of stuff in VB but never in VBA...I thought it would be very similar...but when I looked at some sample code that was given to me.. I did not make any sense to me...neither do I have any access to any VBA books....

    a) Can anyone point me to a VBA tutorial\code sample for Data Entry Forms in particular...ones with Add Modify Delete Find etc. in them ???

    b) I have a code sample right here that is not making any sense to me...makes sense to you ?

    VB Code:
    1. Private Sub cmdFind_Click()
    2. On Error GoTo Err_cmdFind_Click
    3.  
    4.     Me!frmEquipSummary.Requery
    5.     DoCmd.RepaintObject
    6.     Me!txtEquipID = [Forms]![frmEquipMain]![frmEquipSummary]![txtEquipID]
    7.  
    8. Err_cmdFind_Click:
    9.     Exit Sub
    10.    
    11. End Sub

    a)...how does this syntax work...Me!frmEquipSummary.Requery ?
    b) I couldnt find this object DoCmd defined anywhere...is this a part of some standard library thing or what
    c) What is the whole deal with these square brackets in the 3rd statement

  2. #2
    Frenzied Member
    Join Date
    Feb 2003
    Location
    Argentina
    Posts
    1,950
    b)DoCmd should be in the Help file (once you're in the code editor, anyway). Basically it runs various Access commands. Maybe Excel as well, but I don't use that.
    c)The square brackets in Access go around keywords used as table or field names, or multiword names (i.e., a table named Some Table). I think Access actually puts them around every table and field name if you use the query designer, but they're not always required if you write your own SQL.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width