Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by UHNSTrust

  1. UHNSTrust

    Hide Field contents based on an AD group of user

    Hi, Is there any way of hiding a field based on an AD group of the user running the t-SQL/SP. I was think of a function that you could call that checked the AD group and then returned TRUE if they belonged in the required AD group. Then you could substitute a fields contents with something...
  2. UHNSTrust

    Change date range in all query objects

    Hi, I have inherited a database which has numerous (70+) queries all with a date range criteria (i.e. Between #01/01/2011# and #31/12/2012#). Each month someone has to change the date range in every query and then run it to get stats out. Is there any quick vba code to loop through each...
  3. UHNSTrust

    Pseudonymisation function

    Simi/George, Thanks for responding so quickly. I was just trying to expand on Simi's method when George's came through and seemed to solve it completely. Thank you both for your help. I can use it but need to spend the time to understand it! JP
  4. UHNSTrust

    Pseudonymisation function

    Thanks simian336. Attached is an example in excel.http://www.mediafire.com/?cgek9nwfjwl79hc
  5. UHNSTrust

    Pseudonymisation function

    I am new to SQL server so am looking for a bit of guidance (and hopefully in simple terms). I have to create a pseudonymisation function to turn a 10 digit number into a 10 digit alpha string. This is then has to have an unlock function to be able to turn it back. Basically it needs to be the...
  6. UHNSTrust

    Top 2 but grouped

    I have worked this out (I think!). However I would appreciate any advice on speeding it up as it is taking 15 minutes to run. my query; SELECT CCC.costcentre, CCC.drug_name, CCC.NoPrescribed FROM sel_CountsByCC AS CCC WHERE (((CCC.NoPrescribed) In (SELECT TOP 30 NoPrescribed FROM...
  7. UHNSTrust

    Top 2 but grouped

    I have had a look around the forum for this and there are lots of examples but I am struggling to understand them. I am hoping that if I use my own data then I will be able to understand it better. I have a table called 'tbl_Drugs_Prescribed'. This table contains 15 fields of which I only...
  8. UHNSTrust

    Query too complex (#Error) - but it isn't!!

    I am trying to do a simple query. I have a dataset which is 2 fields (AdmissionDate and DischargeDate). I want to be able to run a query where I supply a criteria (date) at run time which then pulls back records where the AdmissionDate is < the criteria date and the DischargeDate is > the...
  9. UHNSTrust

    Exporting relational data to a flat file

    Thank you all for your responses. HarleyQuinn - Thanks for this. It needs some work to develop this because of the unknown amount of treatments. Skip - That is very useful for other stuff. I need to automate this so it might get a bit technical. Duane - This seems very simple. Thanks for...
  10. UHNSTrust

    Exporting relational data to a flat file

    I have a query that produces data on many lines due to a one to many relationship in the table design. What I have been asked to produce is a flat file with the 'many' part of the relationships as additional fields on the end of the record. They want it in Excel or CSV file. This should maker...
  11. UHNSTrust

    Import a delimited txt file which has 741 fields

    Hi, I need to import a delimited (|) txt file which has 741 fields. I appreciate that access tables can only have 255 fields so need to be able to develop 3 tables that are relational (121). I presume it can only be done through code and by manipulating the txt file first. However I haven't...
  12. UHNSTrust

    Delete linked table if no records

    Hi pwise, Worked perfectly with a bit of playing for timeouts to the DCount. Thanks Jonathan
  13. UHNSTrust

    Delete linked table if no records

    I have just created an ODBC and linked over 1000 tables. However for ease of use I want to be able to delete all of the tables where there are no records (100s). Can someone advise me of how to do this with code in a module? Thanks in advance Jonathan
  14. UHNSTrust

    Report field blank when set to Vertical text - IE7 problem

    Remou, Thanks for that. Courier did work. Not pretty but good enough. Cheers
  15. UHNSTrust

    Report field blank when set to Vertical text - IE7 problem

    I have labels and text fields on a report that when I put them to vertical orientation go blank. I have just had IE7 installed and did not have a problem prior to this. I have googled the problem but not seen any specific reference to MS Access (although lots within other applications). Does...

Part and Inventory Search

Back
Top