SubForm hiding text field (1 Viewer)

mattP

Registered User.
Local time
Today, 15:50
Joined
Jun 21, 2004
Messages
87
Ok this is a bit long winded and I will try to explain,

I have a main form, with a title at the top, then a row of buttons underneath and underneath the buttons I have a sub form.

Some of the buttons can have a dual function (or multiple function) so rather than open up another form I have hidden text below the button, so that when the mouse moves over the button, the text becomes visible. this gives the impression of a drop down menu off that button.

However I cannot get the text to appear over the top of the subform, it only appears behind it.

To give an example of what the buttons and drop downs are for, one of the buttons is a reports page, rather than open another form I can have a list of the differnt reports I wish to run (currently they are text boxes with an on click event).

any advice woudl be much appreciate and even an alternative to what I am doing if anybody has one.

Many thanks

MattP
 

godofhell

Database Guru
Local time
Today, 07:50
Joined
May 20, 2005
Messages
180
One of the best practices used is to simply create a popup form with the different report options. You can make the form small enough so it looks presentable. You can have the form open as the Report button gets the focus and close it when it loses the focus. Check out the attached database for a working button.
 

Attachments

  • Field Search.zip
    58.9 KB · Views: 107

mattP

Registered User.
Local time
Today, 15:50
Joined
Jun 21, 2004
Messages
87
godofhell,

Thanks for the sample, I had looked at this as an option before, is there a way that you can lock the form so it open up right underneath the button, even if the main DB screen has been moved or resized ?

Thanks for the help.

MattP
 

godofhell

Database Guru
Local time
Today, 07:50
Joined
May 20, 2005
Messages
180
To ensure it is always displayed correctly I suggest adding it to the main form and simply hide it, then display it when the button is pressed. If you set the resize option it should show correctly. Check out the new trick I used to display it as a dropdown list. I used a subform with no SourceObject, when the button is clicked the form is displayed and the SourceObject added through Code. Enjoy, this one was fun making.
 

Attachments

  • Field Search Modified.zip
    15.2 KB · Views: 111

godofhell

Database Guru
Local time
Today, 07:50
Joined
May 20, 2005
Messages
180
MattP, after testing the attached database I noticed that since I have the Event on Lost Focus for the Report button it closes out the Report Options form. To correct the problem I moved the code for the On Exit to the on Enter of the 1st textbox. The code can be entered as a sub and called by any of the controls on the form so that it hides the report options when the other controls are selected.

'This one calls it directly from the event of the txtFirst textbox
Private Sub txtFirst_Enter()
Me.subfrmReport.Visible = False
Me.subfrmReport.SourceObject = ""
End Sub

'To call it using a sub from the textboxs
Private Sub txtFirst_Enter()
HideReport
End Sub

Private Sub txtLast_Enter()
HideReport
End Sub

Private Sub HideReport()
Me.subfrmReport.Visible = False
Me.subfrmReport.SourceObject = ""
End Sub
 

mattP

Registered User.
Local time
Today, 15:50
Joined
Jun 21, 2004
Messages
87
Godofhell,

Thanks for the feedback and help, I did come across the attached sample, that has Windows type menu's which I am looking into at the moment.

This sample was kindly supplied by http://www.candace-tripp.com/.

I have incorporated this into one of my main forms and it works really well.

Thanks for the help though.

MattP
 

Attachments

  • 631622-formwithmenu.zip
    38.3 KB · Views: 101

Users who are viewing this thread

Top Bottom