Search results

  1. K

    Filter By Multiple Comboboxes on a form

    I was sure your code was right. Didn't mean to offend. Was confused b/c I took the wrong approach in reseting the filters in other events. Commented out the 'null' commands in those events and filters work fine. Thanks much. You've been extremely helpful!
  2. K

    Filter By Multiple Comboboxes on a form

    I assumed the AND would function as you say it should. But, it doesn't. It functions as an OR. Here's my entire code for the form. Not sure if something else in here is causing the issue: Option Compare Database Private Sub Form_Load() Me.lst_Zones.Enabled = True Me.cmb_Phase.Enabled...
  3. K

    Filter By Multiple Comboboxes on a form

    That eliminates the bug. But also brings me back to my first issue: I need to filter on Phase and Zone. Not Phase or Zone. Your code results in an or option. Any way to make it 'and?'
  4. K

    Filter By Multiple Comboboxes on a form

    Got an error message: Debugger points to: Me.Filter = strFilter
  5. K

    Filter By Multiple Comboboxes on a form

    As of right now, this code works to filters on either one OR the other field. I need "AND." Just not sure how to make the two play nice together.
  6. K

    Filter By Multiple Comboboxes on a form

    Working on a similar issue. Trying to keep it simple. How can this existing code be modified to retain the "Phase" filter and then further widdle down on "Zone?" Private Sub cmb_Phase_AfterUpdate() If IsNull(Me.cmb_Phase) Then Me.FilterOn = False Else...
  7. K

    You Can't Assign A Value To This Object

    Also tried this: http://www.access-programmers.co.uk/...ad.php?t=76173 ...to no avail.
  8. K

    You Can't Assign A Value To This Object

    Triple-checked. The field name 'ADDED_BY' is definitely in the table and spelled correctly in my code. The error still occurs with only the public function active and the private one inactive. (Thanks for responding so quickly, by the way.)
  9. K

    You Can't Assign A Value To This Object

    I set the textbox control equal to: = GetUserName () Public Function GetUserName() As String GetUserName = Environ("UserName") End Function Private Sub Form_BeforeUpdate(Cancel As Integer) Me![ADDED_BY] = GetUserName() End Sub
  10. K

    You Can't Assign A Value To This Object

    Both. I need the username to be auto-generated on the form and also added to the table. Played around with it a bit and found that this syntax worked: Me![LAST_EDITED_BY] = GetUserName() But, I have another issue now... I need to do exactly the same thing in a different form...
  11. K

    Save UserName & Date-time of When Updated to a form table.

    Figured it out. Geesh!! This thing gave me grief for two weeks!! I still have no idea when to use certain types of syntax. But, I played around with it until it worked. Private Sub Form_BeforeUpdate(Cancel As Integer) Me![LAST_EDITED_BY] = GetUserName() End Sub
  12. K

    Save UserName & Date-time of When Updated to a form table.

    Also...my table is linked. VBA tells me: "The expression you entered refers to an object that is closed or doesn't exist" Not sure if that has anything to do with it, even though I'm able to edit other fields in the linked table with no issue.
  13. K

    Save UserName & Date-time of When Updated to a form table.

    The username still isn't visible on the associated table.
  14. K

    You Can't Assign A Value To This Object

    Hi! Trying to do the same thing. I tried this and got "You Can't Assign A Value To This Object." My public function works fine. The form displays the username. I added the priavate sub on my form's BeforeUpdate event, and that's where the issue lies. Table Field name: LAST_EDITED_BY Form...
  15. K

    Save UserName & Date-time of When Updated to a form table.

    Hi! Trying to do the same thing. I tried this and got "You Can't Assign A Value To This Object." My public function works fine. The form displays the username. I added the priavate sub on my form's BeforeUpdate event, and that's where the issue lies. Table Field name: LAST_EDITED_BY...
  16. K

    Filter reports based on 2 multiselect listboxes

    Hi! Working on a similar project where users can make selections from one of two listboxes to run a query. My code worked fine for just one listbox ('Phases'). Phase is numerical and Zone is text. Having trouble incorporating the right code to have Access check one list OR the other...
  17. K

    Check if cmd button has been clicked

    I'll give that a shot. Thanks!
  18. K

    Filter a report based on a couple of multiselect listboxes

    Hey all! Trying to run a query based on either one multiselect listbox OR another. Trouble is...I'm not sure how to tell access to run based on one OR the other. 'lst_AdHocPhase' works perfectly. However, 'lst_Zone' is completely ignored when I make a choice (ie. the query returns zero...
  19. K

    procedure declaration does not match description of event or procedure having the sam

    Getting same error and I'm at a complete loss. Was working up until I got cute and decided to use more descriptive names for the command buttons. Got the error msg immediately after that and I cant make it go away. Tried renaming the buttons, but to no avail. Please HELPPPP!!! CODE...
  20. K

    Check if cmd button has been clicked

    This is an Add Only form. I have chosen to hide navigation buttons, because I don't want them used. We don't want users to see previous records. Also, the DB will be used by very inexperienced users, who are very much accustomed to seeing "Save" and "Exit" buttons. I am also open to...
Back
Top Bottom