in Help file context, [] indicates optional arguments, so the brackets
should not actually appear in your code. Neither should the parentheses
evidently. The following appears syntax-error free (and compiles) in my vbe:
In the Open event of "frm_Sort - OBSV Missing"
DoCmd.MoveSize 500, 500, 0, 0
BTW, you sure about Height & Width of zero?? You won't get much of a form
with those settings. If you want to use the form's current H & W settings,
leave them blank, not zero:
DoCmd.MoveSize 500, 500
"..can't find field '|' referred to in your expression."
That's the exact error you get? The appearance of the word 'field' makes me
wonder if the error is related to something else entirely. MoveSize and
"can't find field" just don't make any sense together. Are you sure this
line is causing the error? If you comment it out what happens?
HTH,
denise said:
I did try that initially and it all turned red. And I get a Syntax error,
when in debug it has that line highlighted.
When I type in the command and it shows you the format of DoCmd.MoveSize
(
,[Down],[Width],[Height]). So I tried that and that is when I get
the
error that it can't fine '|'.
I have tried it with and without the brackets and parentheses and if I go
ahead and run it like you have shown I get a Syntax error.
Any other ideas? I'm clueless here and ready to get out the hammer! Just
kidding, need a little humor right now.
ruralguy via AccessMonster.com said:
The MoveSize needs to be in the next form and the syntax is:
DoCmd.MoveSize 500, 500, 0, 0
as they are all numbers.