Search results

  1. J

    List Query name and expression

    I just want to list each query name in one field of a table and then list each field expression in the next field. so. List the Query name in field1 of my table and then the field expression in the next field of the table, then in the next row of the table it would be the same query name and...
  2. J

    List Query name and expression

    Thanks for trying anyway. Due to the hundreds of queries I would need a loop for each query and each field within the queries.
  3. J

    List Query name and expression

    Hi Brian, I'm not sure of the name of the calculated fields as the code searches through hundreds of fields looking for any fields that have expressions in them and then writes them to the specified table. If you could help with the code it would be great as otherwise I have to manually check...
  4. J

    List Query name and expression

    I put your code in and get the following error, Runtime error 3265, item not found in this collection. Is this because I should be renaming the CalculatedFieldName as something else. Public Sub QueryFields() ' Read control source property of all controls in all reports. ' Note.. the debug...
  5. J

    List Query name and expression

    I have the following script which lists the query name and it's field names. I also want to list any expressions in the field names but am not sure how to achieve it. i.e the expression in a field of one query is. Desc: [PMatCatDesc] & " " & [SMatCatDesc] & " " & [SizeDesc] & " " & [ColDesc] &...
  6. J

    string to return textbox sum

    what do you suggest? as I can't use dsum as the textbox would not show as updated unless they tab off.
  7. J

    string to return textbox sum

    The ThisCount textbox (in subform) is bound to a field. When they add a value in the ThisCount box (continuous) it then sums the values into a textbox named txtAdjust which has the formula. =Sum([ThisCount]) Another textbox contains the original sum value, which I then subtract the txtAdjust...
  8. J

    string to return textbox sum

    I already have that happening, it doesn't work and is the whole reason for this thread. The textbox that sums thiscount is not updating when I click my commandbutton, to process data unless they tab off it, that's why I am attempting to use a string instead. It isn't summing 1 value as it is a...
  9. J

    string to return textbox sum

    I have a textbox on a subform and I want to get the sum in a string as follows. Dim s1 As String s1 = Sum(Forms!CountItem!CountItemLastCount.Form!ThisCount) MsgBox s1When I use the above I get an error message saying - Sub or function not defined and it highlights the sum part of the...
  10. J

    set currentuser

    Application.currentuser is what I am talking about and you do not have to log out then back in to set it. The very first scripts that I provided change the application.currentuser programmatically, as stated the only problem I am having with the script is that it actually clears the initial...
  11. J

    set currentuser

    OK, here goes. A user logs on to a database using their user name and password. Access stores their user name and password automatically as the currentuser (no script required, as it is an automatic Access process when anyone logs on). There is one command button (Cb1) on a form that I will...
  12. J

    set currentuser

    When I use the set method from the first button it will store the currentuser name in the table named UserInfo, so I use an update query script to add the currentuser name into the field named CurrentUserID, so the original user name/currentuser name is always stored from that point on, it isn't...
  13. J

    set currentuser

    It is a single user database. Skip the open form event for now, as a button is more important to set when I want too. I basically want to set the current user from a command button. So at the moment the user is in their database with their currentuser name set as say Bob, then I click the...
  14. J

    set currentuser

    so I tried the script that you provided, it sets the gblusername, but how do I then set the currentuser to gblusername. I tried the following but get an error Public Function SetCurrentUser() As String gblusername = Nz(DLookup("CurrentUserID", "UserInfo"), vbNullString) currentuser =...
  15. J

    set currentuser

    I set it manually through buttons or form update events etc... I will check out the code when back at work in a couple of days time. Thanks for your help, much appreciated.
  16. J

    set currentuser

    The code to set the currentuser is listed in my first post, it is in the form open event, this is where I was having the problem, it was setting the currentuser to null as nothing was in the table. Dim TableName As String TableName = Nz(DLookup("CurrentUserID", "UserInfo")) If TableName <> ""...
  17. J

    set currentuser

    The global name is set when the first form opens, it checks for the value in the table and if no value is there then it leaves currentuser as the user name that they logged on with, it's because sometimes the user name is set by getting to the database from another database and I want to store...
  18. J

    set currentuser

    the function is in a stand alone module. I have tried changing the following but then get an error when trying to set currentuser along the lines of left function variable error. function Setcurrentuser as string Setcurrentuser = gblusername Currentuser = Setcurrentuser end function the...
  19. J

    importing objects from secured database to clean database

    Thanks for all your help, much appreciated.
  20. J

    importing objects from secured database to clean database

    I tried ctrl+A, shift+ctrl+end, arrow down etc... but it doesn't select them all, My Access version is 2010. Shortcut keys are enabled as I can use F11 etc... The error message was for a linked table, it seems that it has been removed from the Back end but not from the front ends and I do get...
Back
Top Bottom