User Profile

Collapse

Profile Sidebar

Collapse
SueHopson
SueHopson
Last Activity: Oct 22 '24, 01:06 PM
Joined: Jan 28 '20
Location: Ontario, Canada
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • SueHopson
    replied to Applying ComboBox filters Sequentially
    Ok, so.... I just moved the tables and form into a blank (test) database, setting the tables as local and reworked my button code from scratch. I'm fairly certain I can laugh at and blame myself for this one...

    It's amazing what a change in logic it makes when you realize that = "" should actually be = Null in your reset code...

    Code:
    Private Sub btnResetFilters_Click()[INDENT]Me.Filter = ""[/INDENT][INDENT]Me.FilterOn = Fals[/]
    ...
    See more | Go to post
    Last edited by SueHopson; Dec 8 '23, 07:08 PM. Reason: FIxed code indents

    Leave a comment:


  • SueHopson
    started a topic Applying ComboBox filters Sequentially

    Applying ComboBox filters Sequentially

    Hi All,

    I'm trying to create a single code (run off a button that calls the Private Sub) for our parts list report that will allow the user to filter by either/both PartVendor and PartType. On the microsoft forum I found multiple examples of code from HansV and simliar code from NeoPa here that I am trying to understand and adapt.

    The code below is works great for me so long as both independant combo boxes have selections,...
    See more | Go to post
    Last edited by NeoPa; Dec 8 '23, 06:00 PM. Reason: Indented the code to make reading it a great deal easier.

  • Finding & Highlighting Duplicate Names over a range of dates

    Code:
    Date	Detail Summary	Ref 1	Ref 2	Ref 3	Ref 4	Ref 5
    24-Nov	RMC 	XX Other	Sue B	Martin	Khanyiso	Sue L
    25-Nov	RMC	Sue B	XX Other	Martin	Conrad	Charles
    [B]25-Nov	OVA	Sue B[/B]				
    26-Nov	OVA 					
    29-Nov	STMARY Catholic Cup	Dianne	Conrad			
    1-Dec	NDSS Sr Girls	Amanda	Dale	Ted	Debbie
    Hi everyone,

    I have been able to find bits and pieces by searching various forums and websites, but am unable...
    See more | Go to post

  • SueHopson
    replied to Data Validation when using a Close button
    Just for fun, I also tried removing an existing customer name and saving it and got a run-time 2101 error.
    The setting you entered isn't valid for this property

    Same error line when I Debug as above
    See more | Go to post
    Last edited by SueHopson; Apr 14 '23, 03:53 PM. Reason: Addl Info

    Leave a comment:


  • SueHopson
    replied to Data Validation when using a Close button
    OK, that makes sense and I understand most of the logic behind the sequencing of these events, the function is called before the form updates and the save button is checking the form to see if it's been changed (Dirty = False)

    So the private function is operating as expected and double checking the form and returning the proper messages...

    HOWEVER when trying to enter a NEW customer record, after the first message...
    See more | Go to post

    Leave a comment:


  • SueHopson
    started a topic Data Validation when using a Close button

    Data Validation when using a Close button

    Ok, I have spent way too much time on this, so reaching out for guidance.

    When I run the code below it does everything I need it to do, except close the form... Before I added the required fields, I had originally used DoCmd.Close on the btnCxSave button, but now it closes the form before the Validation Code finishes running.

    Thoughts?

    Code:
    Private Sub Form_BeforeUpdate(Cancel As Integer)
    ...
    See more | Go to post

  • NeoPa = My Access Hero!
    Today I learned about inserting procedures - thank you!
    See more | Go to post

    Leave a comment:


  • Got it! Thanks for the Referring to Items on a Sub-Form link.
    Love learning with you!
    See more | Go to post

    Leave a comment:


  • Hey Neo :)

    That's the version I have been working off, and it works great.

    The original problem came from the previous designer's code. By using an unbound list set with column counts, she was able to display the data in a list display that would highlight the whole row whenever you clicked on any individual field. Then if the user double-clicked anywhere it would open the next form.

    I think I have found...
    See more | Go to post
    Last edited by SueHopson; Apr 6 '23, 06:38 PM. Reason: Added code tags

    Leave a comment:


  • SueHopson
    started a topic Alternate colors in an Unbound Continuous Form

    Alternate colors in an Unbound Continuous Form

    Hi Everyone,

    All my research leads to http://www.lebans.com/alternatecolord etailsection.ht m BUT it's a .mdb file I can't open so I'm not sure if it will help my learning curve or not. I also looked at this topic frim Michael R. [Row numbers and alternate colors to a Continuous Form] but couldn't decipher it.

    Can anyone help me access the content please or guide me in the right direction?

    For the subforms...
    See more | Go to post

  • Hey Neo,

    After reading your comments, I decided a different approach would be better and instead called the sbfm edits from within the subform itself. I need the subform locked until the user makes a conscious decision to edit them because well, my users aren't the most attentive...

    All 3 subforms begin with sbfm_Cx and I have all 3 locked on open. For space they are set on a Tab Control
    tab_Customers
    ...
    See more | Go to post

    Leave a comment:


  • Passing a new CustID back to a ComboBox and Requery/Refresh the form.

    Ok, sorry folks, but I simply can't wrap my head around this no matter how much I research

    I have a ComboBox cmb_CxLookup whose row source is
    Code:
    SELECT qry_CustMAIN.CustID, qry_CustMAIN.CustName, * FROM qry_CustMAIN ORDER BY qry_CustMAIN.CustName;
    The Bound column is 1 CustID, which is hidden from the user

    My AfterUpdate code is
    Code:
    Private Sub cmb_CxLookup_AfterUpdate()
        DoCmd.SearchForRecord
    ...
    See more | Go to post

  • While testing the individual code lines to see if I could find my mistake in my second post, I found a workaround I liked better. The buttons are displayed with no background or border and look/act like hyperlinks on the form - they look much cleaner and much more user-friendly.

    Code:
    Private Sub lnk_AllCustomers_Click()
        Me.cmb_CxLookup.RowSource = "SELECT * FROM queCustomers ORDER BY queCustomers.Company;"
    ...
    See more | Go to post

    Leave a comment:


  • Ok, so I was able to lookup the resources and create the VBA Code for the Search for Record successfully

    Code:
    Private Sub cmb_CxLookup_AfterUpdate()
        DoCmd.SearchForRecord acDataForm, "frmMain", acFirst, "[CustID] = " & str(Nz([Screen].[ActiveControl], 0))
        DoCmd.RefreshRecord
    End Sub
    The default view is Single Form not Continuous. and the form is pulled from the query -...
    See more | Go to post

    Leave a comment:


  • How to FindRecords Properly in VBA instead of Macro

    So I have a lookup on a form that is searching for the Customer based on the following Embedded Macro

    Code:
    ="SearchForRecord
    ObjectType
    Object Name
    Record First
    Where Condition = [CustID] = " & Str(Nz([Screen].[ActiveControl],0))
    It's pulling on the following data:
    SELECT qry_cxLookup.Cu stID, qry_cxLookup.Co mpany FROM qry_cxLookup ORDER BY qry_cxLookup.Co mpany;
    ...
    See more | Go to post

  • SueHopson
    replied to Insert into and default fields
    I'm about 2 hours east of Toronto, on the same lake - Ontario- so, being Canadian, Celcius definitely works for me.

    It was -14 here yesterday, and +1 today, but the weather here is weird...
    The lakefront effect in Toronto is very different from where I work along Lake Ontario. But then again, where I work and home (North of the major highway, and where the elevation changes) is about a 20 min drive and I might go from freezing...
    See more | Go to post

    Leave a comment:


  • SueHopson
    replied to Insert into and default fields
    The code you provided worked perfectly and the layout is much clearer to me as I continue to learn. I was even able to go back into the code and add a field I had previously overlooked. The resources were great and gave me much better insight. It was also new to learn how I can better review my errors by running the code in steps. Very helpful, Thank you!

    PS LOL, you are more than welcome to come and use my snowblower here in...
    See more | Go to post

    Leave a comment:


  • SueHopson
    replied to Insert into and default fields
    Hi Neo,

    Nice to be chatting with you again :) Hope you have been well!

    I've just read through your post again, and although it makes little sense, it seems you're asking for the existing values from the [tbQuote] record to be copied across rather than set to [QStatID]=1 & [DateCreated]=Today. Why [DateCreated] could ever be set to something other than today for a newly-created quote is beyond me so I'll give individual...
    See more | Go to post

    Leave a comment:


  • SueHopson
    started a topic Insert into and default fields

    Insert into and default fields

    Hi Everyone

    It's been a while since I've been on here, or have been doing any coding for that matter, so I apologize up front if I forget to post something correctly. I have "inherited" a database and despite all my research I am not sure how to proceed, what I am doing wrong/missing logically, or if what I am trying to do can even be done...

    I have a form that is set to copy data from and into multiple tables...
    See more | Go to post

  • SueHopson
    replied to Adding Unbound Data to Table
    You have given me a lot to think about and I've been doing a lot of research...
    I've decided that ahead of Before Update() I'm going to try to code the form to try and make the data entry smoother.

    Below is the Private Sub TYPE_Mon_AfterU pdate() I have been developing. But I've hit a snag on one of the required attributes, where Vacation hours requested cannot be greater than 9...

    Code:
    If imontemp.Value > 9.1
    ...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...