What OpenForm method is this referred to? (1 Viewer)

NauticalGent

Ignore List Poster Boy
Local time
Today, 10:34
Joined
Apr 27, 2015
Messages
6,286
I have taken to opening forms with this method...
Code:
DoCmd.OpenForm "frmOrder", _
    WhereCondition:="CustID= " & Me.txtCustID

...as opposed to:
Code:
DoCmd.OpenForm "frmOrder",,,"CustID= " & Me.txtCustID

My co-workers have asked me why I do it this way because it confused them a little at first. Even though it takes more "hand-jamming", it appeals to me. It could that it looks cleaner but I really don't have a reason. My question is does this the first style (method?) actually are have a name?

Edited for grammar and readability. English is not my first language; southern red-neck is...
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:34
Joined
May 7, 2009
Messages
19,175
My question is does this style (method?) actually are a name
they are.
just look at the second code. you need to put 3 comma to put the criteria.
while on the second, you can directly specify it.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 10:34
Joined
Apr 27, 2015
Messages
6,286
they are.
just look at the second code. you need to put 3 comma to put the criteria.
while on the second, you can directly specify it.
I worded that badly. I seems like I was asking if there were the same (which I knew), but I was asking if the first method has a name. My grammar skills are almost as bad as my coding...
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:34
Joined
May 7, 2009
Messages
19,175
Code:
DoCmd.OpenForm FormName:= frmOrder", _
    WhereCondition:="CustID= " & Me.txtCustID
 

Users who are viewing this thread

Top Bottom