Search results

  1. V

    Compare table and aggregate query to find differences

    I did not want to use one categories table for both sides because of the procedure when users are entering data. First orders are created which may have many category-costs and then the invoice comes in which is then linked to the appropriate order(s). The orders and their category-costs need...
  2. V

    Compare table and aggregate query to find differences

    Hello again :) I have an orders table on one side and an invoices table on the other There is a relationship of one invoice to many orders, one order to many category-costs (budget) And also one invoice to many category-costs So one invoice has a few category-costs but may have many orders...
  3. V

    Compare table and aggregate query to find differences

    What is the best way to compare a table with an aggregate query? The aggregate query has two group byand one sum. The three fields on either side have the same name and data type. Someone mentioned union queries are good for comparing but not with aggregate queries.
  4. V

    Textbox afterupdate event preventing combobox dropdown

    Tried setting the subform filter to ObjectiveID = 0. This worked well, was a fair bit slower cycling the records than the breaking and reconnecting the linkmasterfields/linkchildfields but probably not enough to make it a problem on the network. Thanks again for all your help.
  5. V

    Textbox afterupdate event preventing combobox dropdown

    Thanks! that looks a lot cleaner. Is it a best avoided to have form/subform/sub-subform and better to do it like you did with 2 subforms on main form? (thanks, i did not know you could do that) Ok so use the after insert event instead to upate listbox, and the records don't jump now...
  6. V

    Textbox afterupdate event preventing combobox dropdown

    Corrupted? I disconnected and reconnected the subform because the database is being used over a network and it is very slow if Form/SubForm1/Subform2 are all connected and you try to cycle through the records. So I thought...Disconnect and cycle through the records quickly and then select...
  7. V

    Textbox afterupdate event preventing combobox dropdown

    On my system if i dont have that code in there then the subform jumps to an existing record when you are wanting it to stay on the new record.
  8. V

    Textbox afterupdate event preventing combobox dropdown

    Thanks for the help, will try and keep this short! :) 1. If you open the 'Updates' form which should open automatically. 2. And then press the command button 'New Objective' 3. And Enter something in the combo field 'Objective Type' and then something random in the text field 'Objective...
  9. V

    Textbox afterupdate event preventing combobox dropdown

    I had to put this code in the afterupdate event: Dim ObjID As Long ObjID = Nz(ObjectiveID) If ObjID = 0 Then Exit Sub If Me.Dirty = True Then Me.Dirty = False Me.Filter = "ObjectiveID = " & ObjID Me.FilterOn = True which was to get the newly generated objective id of a new record...
  10. V

    Textbox afterupdate event preventing combobox dropdown

    Sorry not ObjID but ObjectiveID a textbox which the autonumber field of a table is taken from
  11. V

    Textbox afterupdate event preventing combobox dropdown

    Dim ObjID As Long ObjID = Nz(ObjectiveID) If ObjID = 0 Then Exit Sub If Me.Dirty = True Then Me.Dirty = False Me.Filter = "ObjectiveID = " & ObjID Me.FilterOn = True Me.Parent!ObjectiveSelect.Requery Me.Parent!ObjectiveSelect = ObjID Where ObjID is the autonumber field that...
  12. V

    Textbox afterupdate event preventing combobox dropdown

    Hi all, I have been trying everyway i can think of to sort this out but no luck, if someone could help me it would be much appreciated. I have a textbox then a combobox in a line, the textbox afterupdate event code prevents the combobox from dropping down on first click.The textbox...
  13. V

    VBA Code/Debugger Window views

    Mmmmm, drag it by the title bar..... So why did i not think of that? It all seems so obvious in hindsight!! Thanks guys, i nearly had a hernia cos of that one!
  14. V

    VBA Code/Debugger Window views

    Can someone please help me reset the format of the code/debugger window. I clicked something and it put the project explorer on the top instead of at the left side where it used to be. I have tried everything i can think of, it is really doing my head in!
  15. V

    Using 2 recordsets

    Yea i no longer use date, the post was a slip. I have a function call to filter the query for the tax year first and then i divide the costs by a field per month because i want to be able to get the query down to either only 1 row if i am summing all the cost values per month for a particular...
  16. V

    Using 2 recordsets

    Thanks smig for heading me off before i went off on some totally unnecessary direction! :) I think i got you now. Use a query and use the grouping function to 'squish' the values down. Create fields in the query like this... JanCosts: IIF(Month[InvDate] = 1, [Cost]) FebCosts...
  17. V

    Using 2 recordsets

    Is this something along the right lines? 1. Bring query into code using recordsets 2. Scan recordset line by line and sort by category/date/cost into an array (Do i need to put into array first?). 3. Link a new recordset to a temporary table and then fill recordset fields sorting by...
  18. V

    Using 2 recordsets

  19. V

    Using 2 recordsets

    Is it possible to open 2 recordsets. Manipulate the data from the first and use it to fill an 'empty' recordset so i could have the data formatted in a way that i could use it as the record source of a report? If so is there any good material out there to read up on this. Many thanks.
  20. V

    Combo box currency formatting

    It was the comma that was causing the problem. Changed the code to: Invoice_Amount.RowSourceType = "Value List" Invoice_Amount.RowSource = Replace(Format(Nz(Cost), "Currency"), ",", vbNullString) You don't get the comma any more but at least it puts it on the one row or column now.
Back
Top Bottom