Improvements

G

Gino

All of the suggestions below might have already been submitted. If so I am
simply adding my voice to the chorus:

1) In form design it is possible to consolidate a number of objects (text
fields, boxes, etc.) in a group. A feature I woulk like to see is to be able
to name a group and then programmatically be able to set the whole group
visible property (and/or some other properties) to true or false (e.g.
groupname.visible = true and groupname.visible=false).
This would make disappear/appear a whole lot of controls without having to
identify them one by one in the VBA code.

2) Provide an active X Calendar form, similar to Outlook, that could display
dated items within Calendar boxes. I was really hoping to find that in Access
2007 but once again I have been disappointed.

3) Provide a listbox capable of displaying updateable yes/no checkmark
boxes, for easy selection.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...-91e4-d88049330c48&dg=microsoft.public.access
 
L

Larry Daugherty

The "wish list" on the Microsoft site might be a better place to get
your wishes noticed. MS doesn't monitor the newsgroups for "wishes"
I've never used it so can't give you explicit directions.

A subform addresses some of the issues in your first wish: make the
subform visible or not based on a control on the main form. To date,
you may have to iterate through the controls on your form or name them
explicitly to change their properties.

Several years ago (Access 2.0!), Ken Getz provided a callback
procedure for a simple listbox (MSLB didn't exist then) in which you
could control the number of columns by design and change the content
of one or more columns depending on runtime conditions. That paradigm
also made use of an array. I still use a version of it for list
management in which I may want all, some or just one element from a
level in a hierarchy. There is some work involved in getting the
solution you want but it is worth it if you'll want to use that
functionality again... It isn't as elegant as the ActiveX solution
you want but it is doable. see "The Access [YourVersion] Developer's
Handbook" by Ken Getz et alia from Sybex.

HTH
--
-Larry-
--

Gino said:
All of the suggestions below might have already been submitted. If so I am
simply adding my voice to the chorus:

1) In form design it is possible to consolidate a number of objects (text
fields, boxes, etc.) in a group. A feature I woulk like to see is to be able
to name a group and then programmatically be able to set the whole group
visible property (and/or some other properties) to true or false (e.g.
groupname.visible = true and groupname.visible=false).
This would make disappear/appear a whole lot of controls without having to
identify them one by one in the VBA code.

2) Provide an active X Calendar form, similar to Outlook, that could display
dated items within Calendar boxes. I was really hoping to find that in Access
2007 but once again I have been disappointed.

3) Provide a listbox capable of displaying updateable yes/no checkmark
boxes, for easy selection.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...-91e4-d88049330c48&dg=microsoft.public.access
 
G

Gino

Thank you very much for your suggestions.
Gino

Larry Daugherty said:
The "wish list" on the Microsoft site might be a better place to get
your wishes noticed. MS doesn't monitor the newsgroups for "wishes"
I've never used it so can't give you explicit directions.

A subform addresses some of the issues in your first wish: make the
subform visible or not based on a control on the main form. To date,
you may have to iterate through the controls on your form or name them
explicitly to change their properties.

Several years ago (Access 2.0!), Ken Getz provided a callback
procedure for a simple listbox (MSLB didn't exist then) in which you
could control the number of columns by design and change the content
of one or more columns depending on runtime conditions. That paradigm
also made use of an array. I still use a version of it for list
management in which I may want all, some or just one element from a
level in a hierarchy. There is some work involved in getting the
solution you want but it is worth it if you'll want to use that
functionality again... It isn't as elegant as the ActiveX solution
you want but it is doable. see "The Access [YourVersion] Developer's
Handbook" by Ken Getz et alia from Sybex.

HTH
--
-Larry-
--

Gino said:
All of the suggestions below might have already been submitted. If so I am
simply adding my voice to the chorus:

1) In form design it is possible to consolidate a number of objects (text
fields, boxes, etc.) in a group. A feature I woulk like to see is to be able
to name a group and then programmatically be able to set the whole group
visible property (and/or some other properties) to true or false (e.g.
groupname.visible = true and groupname.visible=false).
This would make disappear/appear a whole lot of controls without having to
identify them one by one in the VBA code.

2) Provide an active X Calendar form, similar to Outlook, that could display
dated items within Calendar boxes. I was really hoping to find that in Access
2007 but once again I have been disappointed.

3) Provide a listbox capable of displaying updateable yes/no checkmark
boxes, for easy selection.


----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.
http://www.microsoft.com/office/com...-91e4-d88049330c48&dg=microsoft.public.access
 
T

Tom Ventouris

aI also had a need to hid/show a large number of controls on a form.
My workaround:
I positioned the cotrols together and placed a rectangle over them. Set the
Visible property of the rectacngle to NO and background colour to same as the
form.
I control the visibility of the rectangle.

Same effect as show/hide the controls behind it. The only drwback is having
to move the rectangle in design view, but once the form design is final, this
is not needed often.
 
G

Gino

Hi Tom,
thank you for your suggestion, which seems to be the only practical
workaround till Microsoft decides to implement a groupname feature (if ever
.....) that will allow us programmers to hide/show a block of fields without
having to change the form layout.

I also used your technique a couple of times. Occasionally I had some of the
fields behind the box surfacing through, during form bulk updates which I
prevented from showing, by using echo on/off.

Regards
Gino
 
D

Dirk Goldgar

In
Gino said:
Hi Tom,
thank you for your suggestion, which seems to be the only practical
workaround till Microsoft decides to implement a groupname feature
(if ever ....) that will allow us programmers to hide/show a block
of fields without having to change the form layout.

Another approach is to use the controls' Tag properties to identify them
as members of a group. Then you could use a routine like this to show
or hide them:

'----- start of code -----
Function ShowControlGroup( _
OnForm As Form, _
GroupName As String, _
Optional ShowOrHide As Boolean = True)

' Shows or hides a group of controls, as identified by the
' presence of <GroupName> in their Tag properties.
'
' Arguments:
' OnForm - A reference to the form object containing
' the controls
' GroupName - The "name" of the group; a string to look
' for in each control's Tag property
' ShowOrHide - True (the default) to show the controls;
' False to hide them.

On Error GoTo Err_ShowControlGroup

Dim ctl As Access.Control

Const conERR_CANT_HIDE = 2165
' Error if control to be hidden has the focus

For Each ctl In OnForm.Controls
If ctl.Tag Like "*" & GroupName & "*" Then
ctl.Visible = ShowOrHide
End If
Next ctl

Exit_ShowControlGroup:
Exit Function

Err_ShowControlGroup:
If Err.Number = conERR_CANT_HIDE Then
' If we can't hide this control because it has the
' focus, just skip it.
Resume Next
Else
MsgBox Err.Description, vbExclamation, "Error " & Err.Number
Resume Exit_ShowControlGroup
End If

End Function
'----- end of code -----
 

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