Open in Design View

S

Steven

Is there code that will open an existing form or query or table in Design View?

For Instance:

Dim vObject As String
vObject = "fAdministrator"

DoCmd.OpenFormInDesignView vObject <- Made up for example

And then the Form be opened in Design View.

Is there anything like that?

Thank you,

Steven
 
S

Steven

Marshall,

Thank you very much. Can you please take a look at my post on 07/12/08
"returning more than one variable on Call retValue(). The item is addressed
in my 3rd posting of that issue.

My question is, is that the best way to get the value of the 4 variables?
ie by walking through the recordset, or is there a direct function here?

Thank you,

Steven
 
M

Marshall Barton

Steven said:
Thank you very much. Can you please take a look at my post on 07/12/08
"returning more than one variable on Call retValue(). The item is addressed
in my 3rd posting of that issue.

My question is, is that the best way to get the value of the 4 variables?
ie by walking through the recordset, or is there a direct function here?


Using a recordset is rarely a good way to get data from
multiple records. Most of the time, you should use a query
like:

SELECT Co, Sum(IIf(CoOpen=0,1,0)) As TestCo,
Sum(IIf(AcctOpen=0,1,0)) As TestAcct,
. . .
FROM thetable
GROUP BY Co

Then you can open a recordset to retrieve each value.
 
S

Steven

Thanks again. That is much easier.

Marshall Barton said:
Using a recordset is rarely a good way to get data from
multiple records. Most of the time, you should use a query
like:

SELECT Co, Sum(IIf(CoOpen=0,1,0)) As TestCo,
Sum(IIf(AcctOpen=0,1,0)) As TestAcct,
. . .
FROM thetable
GROUP BY Co

Then you can open a recordset to retrieve each value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top