Dick7Access
Dick S
- Local time
- Today, 08:23
- Joined
- Jun 9, 2009
- Messages
- 4,337
I have cmdButton that opens a form (frmPics) that when it opens it displays three bitmaps pertaining to record being view at the time. Originally I had an embedded macro do this. This is what is listed in the embedded macro:
Wanting to switch to VBA I put in new cmdButton and wrote this code:
Expecting it to open just the form without the reference to the Id, and then I would study how to write code for a where statement.
It still reference the record that I am on. Since I am switching from embedded macro to VBA for the sake of learning VBA I am perplexed by this happing.
Can anybody tell me why the where statement is not needed?
Dick S.
Code:
OpenForm
Form Name frmPics
View Form
Filter Name
Where Condition = [chid]=[Forms]![all churches F]![CHID]
Data Mode
Window Mode Normal
Code:
Private Sub cmdPics2_Click()
DoCmd.OpenForm "frmPics"
End Sub
It still reference the record that I am on. Since I am switching from embedded macro to VBA for the sake of learning VBA I am perplexed by this happing.
Can anybody tell me why the where statement is not needed?
Dick S.