P
Paul
Please could you look at the following discusstion I had
with an expert individual. Unfortunately I still have
difficulty with the suggestion and if anybody coudl shine
light on the matter, it would be greatly appreciated.
I dont understand what is asked with the field name being
passed over and the concatenation. If you could please
read the discussion we had, starting from the bottom and
explain and/or 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.
I'd like to thank Wayne for his contribution.
Thankx
Paul
with an expert individual. Unfortunately I still have
difficulty with the suggestion and if anybody coudl shine
light on the matter, it would be greatly appreciated.
I dont understand what is asked with the field name being
passed over and the concatenation. If you could please
read the discussion we had, starting from the bottom and
explain and/or 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.
I'd like to thank Wayne for his contribution.
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