Search results

  1. R

    Populating a TextBox on a form dependant on another textbox using a query

    Hi Bob Slight strange thing when I open the Form and all fields are blank then I populate the two user select ones the final TextBox does not populate - when I change to Design View and then back to form view the TextBox is populated - am I missing something ? Thanks Rich
  2. R

    Populating a TextBox on a form dependant on another textbox using a query

    Hi Bob Thank you so much that has worked perfectly - I had the syntax incorrect Thanks Rich
  3. R

    Populating a TextBox on a form dependant on another textbox using a query

    Hi Bob No the two combos are just for the users to select from two dropdown lists. I have then concatenated those in a TextBox which I wanted to use to help select the value for the second TextBox I am sure I have done something similar previously but have not used Access for a couple of...
  4. R

    Populating a TextBox on a form dependant on another textbox using a query

    Thank you - I have seen that but I can't work out where to put the DLookup (i.e. which textbox) so that the final textbox is updated could you advise me ? So the two fields in the Query are called CCJN (Old Cost Centre) and FULLCC (New Cost Centre) The TextBox that has the Concatenated Fields...
  5. R

    Populating a TextBox on a form dependant on another textbox using a query

    I have a query that has two columns one being an Old Cost Centre and the other being a New Cost Centre I have a form that has two ComboBoxes and then a TextBox that is populated by the concatenation of these two ComboBoxes this is the Old Cost Centre in the above query I have an additional...
  6. R

    Using a tablename in a query

    Hi Paul Thank you so much it now works - you are a life saver. There was a stray comma in there but I removed it and it is calculating perfectly Thank you Rich
  7. R

    Using a tablename in a query

    Hi Paul What I mean is that the table has a total at the bottom as it is imported from excel. But that row doesn't have an Emp ID. That is why I added the where clause I have tried what you suggest and the code looks correct. But the total row still seems to be getting added in Totally...
  8. R

    Using a tablename in a query

    Hi Paul Here is the code INSERT INTO tblC5_1TotalCurrent ([BWS], [DateImported], [BASIC CASH], [BONUS CASH], [COMMISSION]) SELECT 'C5_1' as BWS, Now()as DateImported, sum([C5_1].[BASIC CASH]) as [BASIC CASH], sum([C5_1].[BONUS CASH]) as [BONUS CASH], sum([C5_1].[COMMISSION]) as [COMMISSION]...
  9. R

    Using a tablename in a query

    Paul I just put the underscores in the code to make it easier for you to read as it was just one long line of code I am probably confusing things more Rich
  10. R

    Using a tablename in a query

    Hi Paul I have just done that and when I tried to create a query with it and it seems to be generating the SQL twice Here is the SQL Generated: INSERT INTO tblC5_1TotalCurrent ([BWS], [DateImported], [BASIC CASH], [BONUS CASH], [COMMISSION]) _ SELECT 'C5_1' as BWS, Now()as DateImported...
  11. R

    Using a tablename in a query

    Hi Paul That worked perfectly - but I have messed up slightly as the tables have a row at the bottom (they were imported from excel) that is a total so when I am summing the columns they are doubling up. The total row is blank in column one which in the original table is called Emp ID so I...
  12. R

    Using a tablename in a query

    Hi Paul Thanks for that - I am just going to try it now Cheers Rich
  13. R

    Using a tablename in a query

    Hi Paul The only thing I keep getting is a box popping up asking me to input into it and on it it has C5. When I tried to use rs!TableName I got the same thing. Currently if I don't type anything in I get: DateImported BASIC BONUS COMMISSION BWS 18/12/2014. 2000 500...
  14. R

    Using a tablename in a query

    Hi I am trying to create SQL within a sub that uses the sum of three elements in a table and the current date but I then want the name of the table that these entries relate to to be inserted into the table also so the Totals for a table called C5_1 would show in the table as: BWS Date...
  15. R

    Running queries multiple times in VBA

    All Sorry for such a silly question - I have similar loops already in the code but for other areas and my thoughts just hadn't put 2 and 2 together at all Thanks all Rich
  16. R

    Running queries multiple times in VBA

    Hi there Hopefully someone can help me. I have a situation where I am using a maketable query to create a table and then I need to use append queries to then add additional records to the created table - some of these are just run once and some multiple times. if possible, I do not want to...
  17. R

    Listing DB Tables in a Listbox

    Hi I have solved this using the following QUERY as the source for the listbox SELECT MSysObjects.Name AS table_name FROM MSysObjects WHERE (((Left([Name],6))= "tblD10") order by MSysObjects.Name Thanks Rich
  18. R

    Listing DB Tables in a Listbox

    Hi I wonder could someone help. I am after creating a list box that will display some of the tables within my database - there are between 10 and 15 tables and the names all follow the same pattern (They all start "tblD10") It is probably something simple but I am not getting my head around...
  19. R

    Interactive Query

    Hi Namliam I need the last column minus 1 as the last column is always total and I wont be using that column so if there are 20 columns in total I would need everything from column 6 to column 19, if there were 15 columns I would need everything from column 6 to column 14 - do you see what I...
  20. R

    Interactive Query

    Hi Dave Thanks for all your help Previously i have been able to do something similar but it was populating a table with tablenames rather than field names so is slightly different. I then used that table to create different queries dependant on the tables that existed I was trying something...
Back
Top Bottom