|
-
Jun 28th, 2004, 09:55 AM
#1
Thread Starter
Addicted Member
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:
Private Sub cmdFind_Click()
On Error GoTo Err_cmdFind_Click
Me!frmEquipSummary.Requery
DoCmd.RepaintObject
Me!txtEquipID = [Forms]![frmEquipMain]![frmEquipSummary]![txtEquipID]
Err_cmdFind_Click:
Exit Sub
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
-
Jun 28th, 2004, 02:31 PM
#2
Frenzied Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|