Size of Query result

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a crosstab query that presents the result as a data sheet view. On my
computers I can drag the size to what I want and then save the design and it
has this size next time I open it.

But on the users computer when saved, it always opens in the same too small
size. It does not help how big he makes it before saving the design.

Anyone know of a way to set the size?
/ Rolf
 
Use the Open event of the form to set up the columns the way you want.

Example:

Private Sub Form_Open(Cancel As Integer)
'Purpose: Set the column widths.

Me.RowHeight = -1
With Me.ClientNum
.ColumnHidden = False
.ColumnOrder = 1
.ColumnWidth = 864
End With
With Me.Surname
.ColumnHidden = False
.ColumnOrder = 2
.ColumnWidth = 2880
End With

With Me.Address
.ColumnHidden = False
.ColumnOrder = 4
.ColumnWidth = -2 'Set for visible text.
End With

'Me.FrozenColumns = 2
RunCommand acCmdUnfreezeAllColumns
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
I have asked with too little information. Sorry about that. With too small
size, I meant that the view was not high enough. That said, I want it to
display 30 rows of data every time, but there comes only some 10 to 15 even
when he has saved the design. Is that possible to do?
/ Rolf
 
So you want to save the height of the datasheet form, so that when you open
it (non-maximized) it is taller?

1. Open it in design view.

2. Make a change (such as changing the caption on a label, even if you
change it to the same text.)

3. Resize the form to the size you want it to be.

4. Save. Close Test.

It should now open the size you had it at step 3.

(Presumably you have enabled the vertical scrollbar, so that if there are
too many rows to see at once, the user can at least scroll.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
 
This is strange indeed. I have done these steps on the user's computer over
internet via pcAnywhere. I have changed the column size of one column and
when closing, it came up with the question if I wanted to save the design.
Clicked Yes. Although it started later with the smaller size when I opened
again.

On my own computers it worked every time. His Office version is 2003 and
mine is 2002. Could there be something in the Office installation that need a
correction?
/ Rolf
 
Unless you switch to design view and then save the changes, the change may
not stick.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
 
I have tested that today, but it does not help. I even changed a field and
then back again as well as the height in the design mode. The only difference
between the user's installation and mine is that he is using Office 2003 and
I have 2002. The Access file is a mde type, but that shouldn't make problem
as the query is still editable.

Do you think there is a setting inside Access itself to allow this design
change.... even though it asks if I want save..?
/ Rolf
 
How did you switch to design view in an MDE?

I would be very interested in hearing about that technique.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
As normal, as the queries are not locked, only forms, reports and code. The
user has also a full licensed version of Office, so I am not using the
developer version in this case.

I must correct one thing I said earlier. I was not using 2002 when writing
this application, but 2000 as I should make a mde version of it. I have
learned that the 2002 version saves the programs in 2000 style by default and
that could not be converted to mde in 2002. - So the program is made in
2000, and I can change and save the query in my 2002 version and it works on
my other computer with 2002, but not in his 2003 version.

/ Rolf
 
Sorry, Rolf

From my first reply, I have assumed you had a Datasheet form to display the
query -- probably because I never let users anywhere near the actualy tables
and queries.

You were talking about queries. I have not been answering your question at
all. Apologies.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

message
news:[email protected]...
 
Ok, I see. There are many details to cope with. I have showed the query to
the user, because it is a crosstab query with dynamic number of columns,
depending on the result. The output is datasheet. I have earlier made a
cumbersome report that does the same thing in an earlier application and
thought I would be able to do it a bit easier this time. I would hope that
his version should present the data the same way as mine does. But I guess I
have to do it with much more labour.

Thank you anyway for your responses.
/ Rolf
 
Allen, I have now tested to make a brand new database in his machine, without
any connection at all to my application. Created a table and a normal query.
- Still the same issue. He cannot change the size of the result of the query.
At least it was not my application that was the problem. I have suggested a
reinstallation of Access as a possible way out - but must admit that I doubt
for the result. If so could it be the hardware that locks up?
/ Rolf
 
I have had problems with trying to make modifications remotely i.e.
refresh table links. I had to create a procedure attached to a command
button on a form that would refresh the links on the remote computer.
Click the command button on the form and that refreshed the links.
Running the procedure directly in the module remotely appeared to work
but did nothing. This may be a similar issue.
 
Yes, you are right abaout that. I have also many times noticed that the
update of my remote display has not always worked. But as we on those
occasions spoke to each other over the telephone, I have heard that it had
been updated on the host side.

But this problem that the query result cannot be set, is still the same on
his computer.

I have earlier got annoyed of another thing, and that is that reports tend
to open in a smaller size than 100%. Even when I try to save it in 100%. Then
I got the tip from an older thread here that if I let the code have the line
"DoCmd.RunCommand acCmdZoom100" right after the open report command on the
preceeding form, it worked. So I tried to figure out if there is something
similiar for the query result, but could not find anything. Maybe there is,
or there isn't?
/ Rolf
 
Back
Top