Recent content by svjensen

  1. S

    Combine multiple queries in one

    I have a database structured around a number of business cases (BC), each with a number of sheets (Faner) of various types. Each sheet is linked to a "department" (NIVII). I now need to build a list of BCs which affect a given NIVII. So far I have been using multiple queries (see below), which I...
  2. S

    Add blank line to listbox in Access 2007

    The Null suggestion did not work, but I solved it using: for i = 1 to .ColumnCount strTempString = strTempString & ";" next i .AddItem strTempString Maybe not pretty, but it works :-)
  3. S

    Add blank line to listbox in Access 2007

    Our firm has recently switched to Access 2007 (i know that we are now in 2011 :)), and running my old 2003 applications I have run into a small problem. Using VBA I write items to listsbox using .AddItem, and eventually I write an empty line using '.AddItem ""'. But in Access 2007 this is...
  4. S

    Run procedure on application shut down

    That is what I am looking at (cleaning up prior to shut down) :-) I will give the form unload event a go. Thanks.
  5. S

    Run procedure on application shut down

    I need to run a clean up procedure when the user closes the application. I have created a toolbar control, which allows the user to close the application, and have the procedure tied up to this. This works fine. But I have been unable to make it run if the user chooses to close the...
  6. S

    Entering data using datasheet

    I would prefer to display a datasheet in which the user can enter the data. The advantage with a datasheet is, that he/she can see all available expensetypes, as it might be neccesary to enter data for each of them. So I am not sure that a combobox will do the trick. Or could it be that I am not...
  7. S

    Entering data using datasheet

    To be honest, I am not sure if this should go into the VBA section, but let my try to explain my problem. Let us say that I have a simple database with two tables (example DB is uploaded here: http://vinther-jensen.dk/access/test.mdb) . One table holds types of expenses (tblUdgiftstyper)...
  8. S

    Export to Excel using VBA - formatting trouble

    I psoted my problem on MrExcel.com as well, which gave a solution: http://www.mrexcel.com/forum/showthread.php?p=2600327#post2600327
  9. S

    Export to Excel using VBA - formatting trouble

    No that is not the problem. Access is supposed to test for numeric values in the first row (headers), since the years (2011, 2012, 2013, ...) are passed as numbers, whereas the corresponding values are passed as text (apparently due to the summation done ind the cross tab query). So after...
  10. S

    Export to Excel using VBA - formatting trouble

    Using a small script (see below) I export data from my Access application to Excel. This works fine. The only problem is, that the data is exported as text, which I thus try to change. I have tested the script in excel and it works fine, but I cannot get it to work from Access. The part of...
  11. S

    Multiply with different variables in query.

    That was my first approach as well, but it does not work. Or I might be missing something :) I get the following error message (translated from Danish, so it might not be completely accurate): You have attempted to run a query, which does not include the expression...
  12. S

    Multiply with different variables in query.

    It works like a charm :cool: One follow up though. As far as I have been able to get it to work, I need to group by the field which I use to call my function (in the example 'tblTest.ExpenseType'). This results in one row for each ExpenseType, and I do not necessarily want that. Let us say...
  13. S

    Best way to display variable data on form

    I need to present data to my user on a form. The data comes from the query: TRANSFORM Sum(tblTable.Value) AS SumOfValue SELECT tblTable.ExpenseType FROM tblTable GROUP BY tblTable.ExpenseType PIVOT tblTable.Year; The nature of the query means, that both the number of rows and columns are...
  14. S

    Multiply with different variables in query.

    Interesting thought. I will give it a go.
  15. S

    Multiply with different variables in query.

    The title might not be exactly to the point, so let try to explain in detail my problem. Let us say that I extract and sum data using the following query: TRANSFORM Sum(tblTest.Value) AS SumOfValue SELECT tblTest.ExpenseType FROM tblTest GROUP BY tblTest.ExpenseType PIVOT tblTest.Year; The...
Back
Top Bottom