Search results

  1. E

    Solved Public variable

    That is so weird - the form is definitely called frmCustomer - and your code works perfectly, yet mine crashes.... Well hell.... I'll take it though - thanks! :-)
  2. E

    Solved Public variable

    I just realised I close the form before assigning the variable I just realised I close the form before assigning the variable ... sigh.... that's fixed the error message at least! concatenate the variable with the select in the cust form button code This is my problem - when the search form...
  3. E

    Solved Public variable

    I thought it looked strange.... So "SELECT * from Customer where CustCode = " & PassCustCode ? However it's not even getting to the Select statement by the looks of it. I am closing the Search form. The change record source refers to the Customer form which hasn't been closed. If I comment...
  4. E

    Solved Public variable

    Thank you! I have been somewhat confused as to where each bit of code is kept, but now I've found the Project Explorer :-) So now I have the CustCode value of the record the user selected in the search form. I close the search form and the Customer form is still displayed (I don't close it when...
  5. E

    Solved Public variable

    I have a form - frmCustomer. If the user clicks on the "Search" button a new form - frmCustSearch opens, without frmCustomer being closed. In the declaration section of frmCustomer, I declare a variable to store the customer code selected in frmCustSearch: Public PassCustCode As Integer When...
  6. E

    Listbox help needed, please

    Thanks Pat. I tried changing the rowsource to your code, but I get an error either way - with or without the single quotes I get a "Compile error: Syntax error" lstJobName.RowSource = "SELECT Jobs.JobNo, Jobs.JobName FROM Jobs WHERE [Jobs].[CustCode]='"&Me.CustCode&"' ORDER BY Jobs.JobNo DESC"...
  7. E

    Listbox help needed, please

    @arnelgp Thanks. Have tried # 2 - without success, sadly. It adds -1 as the first entry in the listbox and selects that 🙈. I will have a look at your solution to #3 tomorrow - my brain hurts now - time for a G&T! Have a great weekend, both of you :)
  8. E

    Listbox help needed, please

    Ah yes..... forgot about the form's record source! Thank you :-)
  9. E

    Listbox help needed, please

    I have a search form which contains 2 listboxes. The first one lists all the customers and when the user picks a customer (On Click event) the second listbox displays all the jobs for that customer. lstCustName is populated from the Customer table with CustNo and CustName, bound on CustCode...
  10. E

    Solved Calculate textbox value

    Thank you both 🤦‍♀️😔
  11. E

    Solved Calculate textbox value

    Good morning! After getting the code you helped me with working, I realised there were more events that would require that code to be run, so I decided to put it in a Function - so I can run it as a macro from wherever needed. I created a Module (modJobCostings), and inside that module created...
  12. E

    Solved Calculate textbox value

    Thanks @arnelgp and @Gasman - seems to work now. I'm still not sure what I was duing wrong, but at this point I'll just accept it works! Hppy weekend :)
  13. E

    Solved Calculate textbox value

    Good point....... :) thanks! I hadn't this time - the blank textblock is on the initial load, so the After_Update event hasn't been triggered. Now I just have to figure out where to put it for the initial form load.
  14. E

    Solved Calculate textbox value

    Thanks :-) That is similar to what I have been trying - the textbox comes up blank. I have tried a direct ControlSource to a table field to make sure the problem is not with the textbox, and that works fine.
  15. E

    Solved Calculate textbox value

    I have a "Job" form, which contains a JobType field. It also contains an Option Group for costing, with 3 radio buttons. Which type of job is selected (1, 2, or 3) will dictate which of the radio buttons are enabled. On opening the form, as well as when the user changes any of the values that...
  16. E

    New to Access

    Estelle here. I wrote a workflow system for a client in VB6 in 1999, and they have asked me to rewrite it so it can run on a Windows 10 laptop. After dabbling in C# and VB, I decided Access 2016 was probably the best way to go about this - it will be a single user application for a relatively...
Back
Top Bottom