From: Dennis on 17 Dec 2009 09:43 Hi, I'm using Access via XP Office with Office XP3. I've looked through the forum and while I saw similar, I did not see the answer to this question. I want to create a continuous form that will display the results of a query. I want the user to be able to click on the heading to change the sort order of the query. I noticed that the labels do not have any events, so I am guessing that I will have to make the column heading text boxes so I can have a click event. Is that correct? I'm also guessing that I'll have to disable those text boxes? If I do that, will the click event still work? I realize that once a user clicks on a column heading, I will have to programmatically change the Form's Order By property. Am I headed in the right direction or is there an easier way to accomplish this? Thanks, Dennis
From: Allen Browne on 17 Dec 2009 10:22 Unattached labels do have a Click event, so you can use that if you use unattached labels (in the Form Header section of your continuous form.) Use the event to set the form's OrderBy property (remembering to set OrderByOn as well.) -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "Dennis" <Dennis(a)discussions.microsoft.com> wrote in message news:34FFCD89-8D02-40AC-8587-C0C72ED6F6A7(a)microsoft.com... > Hi, > > I'm using Access via XP Office with Office XP3. I've looked through the > forum and while I saw similar, I did not see the answer to this question. > > I want to create a continuous form that will display the results of a > query. > I want the user to be able to click on the heading to change the sort > order > of the query. > > I noticed that the labels do not have any events, so I am guessing that I > will have to make the column heading text boxes so I can have a click > event. > Is that correct? I'm also guessing that I'll have to disable those text > boxes? If I do that, will the click event still work? > > I realize that once a user clicks on a column heading, I will have to > programmatically change the Form's Order By property. > > Am I headed in the right direction or is there an easier way to accomplish > this? > > Thanks, > > > Dennis > >
From: tighe on 17 Dec 2009 10:29 Dennis, Personally i would use buttons instead of text boxes, the formatting can be changed to resemble labels. i have only done this in reports but it should be similar in forms, the on click event: Private Sub Command29_Click() Me.OrderBy = "" Me.OrderBy = "Criteria" End Sub hope this helps. "Dennis" wrote: > Hi, > > I'm using Access via XP Office with Office XP3. I've looked through the > forum and while I saw similar, I did not see the answer to this question. > > I want to create a continuous form that will display the results of a query. > I want the user to be able to click on the heading to change the sort order > of the query. > > I noticed that the labels do not have any events, so I am guessing that I > will have to make the column heading text boxes so I can have a click event. > Is that correct? I'm also guessing that I'll have to disable those text > boxes? If I do that, will the click event still work? > > I realize that once a user clicks on a column heading, I will have to > programmatically change the Form's Order By property. > > Am I headed in the right direction or is there an easier way to accomplish > this? > > Thanks, > > > Dennis > >
From: Dennis on 17 Dec 2009 10:47 tighe, I wanted to go with buttons, but I could not figure out how to change the formatting to make it look like a label. How do you change the formatting to look like a label? I do not use a Picture and if I change the Transparent property to True, the button disappears. It is true I can put a transparent button over each label, but I was hoping for a simpler approach. Thanks. Dennis
From: tighe on 17 Dec 2009 13:26 Dennis, change the "back style" to transparent. allen's point is also good. "Dennis" wrote: > tighe, > > I wanted to go with buttons, but I could not figure out how to change the > formatting to make it look like a label. How do you change the formatting to > look like a label? > > I do not use a Picture and if I change the Transparent property to True, the > button disappears. It is true I can put a transparent button over each > label, but I was hoping for a simpler approach. > > Thanks. > > Dennis > >
|
Next
|
Last
Pages: 1 2 Prev: How to stop receiving e-mails from this group? Next: Code no longer works |