My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
Posts: 119 Joined: 11-January 15 ![]() | To RJD and everyone that has guided me so far, thank you very much. I basically started from scratch early today with my databases after re-reviewing some of the recent comments, and rethought about the whole thing... (again). I have this form and there is a checkbox for "Inactive" purchase orders. You know, simply click the box if the PO is Inactive. I made an unbound checkbox called chkPO and linked it, but this is not really what I'm wanting, after think about it. What I really need it to show if the PO is Active, Inactive, and both. I was playing with a control group earlier, but I'm completely lost with them. Would this be the best way to go? If so, could anyone send a link for some learning for this newbie. Or, with a yes/no/both, should I just create something with VBA? Any suggestions? The form filters what I have for either CODE Private Sub chkPO_Click() If Me.chkPO.Value Then Me.Filter = "Inactive = " & Me.chkPO = True Me.FilterOn = True Me.Requery Else Me.FilterOn = False Me.Requery End If End Sub -------------------- [font="Georgia"][/font]Daniel |
![]() Post#2 | |
Posts: 112 Joined: 23-May 17 ![]() | Hi I asked a similar question a while back and the solution I came up with was quite simple. I put an option box on the form with 'all / active / cancelled ' radio buttons and then a command button next to with the title Update. I ram a macro when the button was pressed and the macro comprised of a condition for each of the three options which applied a querie for each in the "where' part. Option = 1 is all records Option =;2 is POCURRENT = true Option = 3 is POCURRENT = FALSE Works a treat Chris |
![]() Post#3 | |
![]() UtterAccess VIP Posts: 5,862 Joined: 30-June 11 ![]() | I'd use an Option group with you three options and then use a case statement to act accordingly. Let's Assume Active = 1 Then you'd do something along the lines of CODE Select Case Me.OptionGroupName Case 1 'Active Me.Filter = "Inactive = True" Me.FilterOn = True Case 2 'Inactive Me.Filter = "Inactive = False" Me.FilterOn = True Case 3 'Both/All records Me.FilterOn = False End Select -------------------- Daniel Pineault (2010-2017 Microsoft MVP) Professional Help: http://www.cardaconsultants.com Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net * Design should never say "Look at me". It should always say "Look at this". -- David Craib * A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions) |
![]() Post#4 | |
![]() UtterAccess VIP Posts: 8,222 Joined: 25-October 10 From: Gulf South USA ![]() | Hi again: ...or you could use a combobox with "Active", "Inactive" and "Both" selections. Then accommodate this in the source query. See the revision to your previous db. See the form, then the record source. This way the "look" will be consistent with your other selections. Also note that the SQL is still in the Record Source and should be moved to a saved query, and referenced in the form Record Source. HTH Joe Attached File(s) -------------------- "Each problem that I solved became a rule, which served afterwards to solve other problems." "You just keep pushing. You just keep pushing. I made every mistake that could be made. But I just kept pushing." Rene Descartes 1596-1650 (Mathematician and Philosopher) |
![]() Post#5 | |
Posts: 119 Joined: 11-January 15 ![]() | Hi Daniel, this was dang near perfect. Sorry, I'm learning on the run here, I had just figure out how to insert the frame and then the buttons, when I saw your code. It just me a couple minutes to figure out to add it to the click event for the frame (and actually change the code to match my frames name, duh!) and then reverse option 1 and two around, and it works perfectly. Now I think I can figure it out in the future... Hi RJD, I basically started over this morning, almost from scratch. I saw the comments regarding the last post related to not using the combobox where I had them (sections from prior forms that the data was already filled in), and I thought it would be best for me to incorporate your prior recommendations and what I was really looking to do. I know I just restarted over before last weekend, but somewhere along the line, I forgot half of yours and other recommendations. At least I'm learning a thing or two. To All, Thank you continued kind assistance. -------------------- [font="Georgia"][/font]Daniel |
![]() Post#6 | |
![]() UtterAccess VIP Posts: 5,862 Joined: 30-June 11 ![]() | ![]() -------------------- Daniel Pineault (2010-2017 Microsoft MVP) Professional Help: http://www.cardaconsultants.com Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net * Design should never say "Look at me". It should always say "Look at this". -- David Craib * A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions) |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 19th April 2018 - 12:36 PM |