P
Paul
Please could you look at the following discusstion I had
woth somebody which was discontinuted.
I dont understand what is asked with the field name being
passed over and the concatenation. If you could list an
example please, it would be greatly appreciated. I bit
off a bit more than I could chew, and when I understnad
this, I'll be in the clear.
Thankx
Paul
woth somebody which was discontinuted.
I dont understand what is asked with the field name being
passed over and the concatenation. If you could list an
example please, it would be greatly appreciated. I bit
off a bit more than I could chew, and when I understnad
this, I'll be in the clear.
Thankx
Paul
number,-----Original Message-----
DoCmd.OpenForm stDocName2,,,"[FieldName]=" & MemberVar
You need to pass the field name also and concatenate in the value of
MemberVar. The above will work if MemberVar is a
if it is text try:DoCmd.OpenForm stDocName2,,,"[FieldName]='" & MemberVar & "'"
This will work as long as there are no values that have apostrophes (i.e.
O'Rielly) in them. If there are, let me know and I'll change it to work with
that.
This is being passed as the WhereCondition. Note the commas as place holders
for the unused options prior to the last used one.
--
Wayne Morgan
Microsoft Access MVP
I need to, with VB code, open a form and display a
specific record.
For a test example, I am have a variable
called "MemberVar" and would like to open a form using
the variable.
I already hae the following which dont work:
DoCmd.OpenForm stDocName2, , MemberVal, MemberVal
"StDocName2" represents the name of the form I want to
open.
I put "MemberVar" in twice because I dont know if they
are or are not suppsoed to be in or either.
As you can see, Im quite stupid, and a little light on
this matter would be greatly appreciated. Thnakx
Paul