Search results

  1. B

    Paste four queries to specific places in open spreadsheet

    Thank you all for your assistance. I may have given the impression that I generally know what I'm talking about - if so, that was my mistake!! Actually, I didn't understand an awful lot of that. I'm not an Access or VBA developer at all, but someone who knows just enough to be dangerous...
  2. B

    Paste four queries to specific places in open spreadsheet

    Hi, I have a button in my Access database that runs four queries and displays the results. The queries are designed in such a way that I know in advance how many rows and columns they will have and this won't change. The queries are named "qryExec01", "qryExec02" etc. I have an Excel...
  3. B

    Val function not enough to solve this

    Thank you so much for that. I looked for help on this earlier and the Microsoft site said that Val(" 1615 198th Street N.E.") returns 1615198 i.e. everything but the digits. So I'm puzzled why it did not remove the decimal point and the % symbol. But your suggestion works! I then divided...
  4. B

    Val function not enough to solve this

    Hi, I have data coming via Excel spreadsheet from an external source and it includes a column called PercentRecruitment. It looks like a percentage but actually it seems to be text. Some sample values are 10% 15.5% 0% 121.66666667% There's no consistency with the number of decimal places...
  5. B

    Problem with data format

    Well they both work equally well in this case, as far as I can see. I didn't know about Val() and can already think of one or two places I might be able to make use of it. Cdbl was probably what I'd been blindly groping towards, as I now recall having used CLng and CDate in the past. The only...
  6. B

    Problem with data format

    Hi, I receive data each week that comes in Excel, but apparently from another system called Qlikview before that (which I don't have access to). One of the columns is called %TE and can have values such as 0% 10% 66.6666667% or blank They are left justified, there is no set number of decimal...
  7. B

    Concatenate variable number of values to one row

    Wow....that works! I won't claim to understand it, but after inserting that module and a fair bit of trial and error replacing the right fieldnames and query names I seem to have got there. I had no end of trouble with the Order By part until - duh! - I realised I didn't need the words "Order...
  8. B

    Concatenate variable number of values to one row

    Hi, I have attached a sample accdb which shows how far I've got with this. Background We have 30 hospitals in our region each designated by alpha codes. The hospitals can run various clinical studies, designated by numeric codes. Sometimes studies are specific to one hospital, but more often...
  9. B

    Repaint doesn't work until end of code

    Aw heck I found it!! I also need to fess up and admit I didn't show you all my code as I was convinced parts of it were irrelevant. After the queries that I showed, I have 3 others that run instantly so do not require screen-updating. It turns out one of those had an error in it: "Too few...
  10. B

    Repaint doesn't work until end of code

    Moving it up and down through the code means whatever section is before the msgbox changes colour all together, after the DoCmd's up to that point have run. After that point, they change colour one at at time, as desired. This holds no matter where I put th msgbox. Except... When I put it...
  11. B

    Repaint doesn't work until end of code

    Hi Spikepl, I inserted a message box as suggested. Up to that point, the code ran as before i.e. several queries ran and THEN the labels up to that point turned green together. But after I OK'd the message box, the rest of the labels turned green one by one as the queries ran. (In fact there...
  12. B

    Repaint doesn't work until end of code

    Hi Ranman256 There is no report, there are no records and I'm not trying to print anything. It's just a form with a button that runs several append queries. The queries run fine, I'm just trying to get labels on the form to change colour to show progress.
  13. B

    Repaint doesn't work until end of code

    Thanks. I'm afraid I need more explanation though, as I don't do this kind of stuff very often. I know there is an On Print event but I don't know how that could work in this case. I probably didn't explain my problem clearly. I have a form with one button and series of labels lbl1112...
  14. B

    Repaint doesn't work until end of code

    Hi, I have a process which runs lots of slow append queries, so I want to reassure the user of progress, by changing the font colour of labels to green when the relevant queries have finished. This is the code I'm using 'Update the older data if that option is selected If...
  15. B

    Show/Hide navigation pane via VBA?

    Hi, I use DoCmd.ShowToolbar "Ribbon" acToolbarNo (or acToolbarYes) depending on a value in a table which I have shown certain "trusted" users how to change. But is it possible to do something similar with the Navigation Pane? Thanks
  16. B

    What's your best/worst joke?

    A lady is out walking her dog when a man stops to talk. "What's your dog's name?" he asks "Achilles", replies the woman. "He does all kinds of tricks." "Achilles, what a great name for a dog!" He laughs to himself after a second and says "Hey, I just thought of something funny". He looks at the...
  17. B

    Code runs OK once, but error next time

    JHB, Thank you *so* much for doing that. After examining your code and mine I can see that I was pretty close and yet I don't think I would ever have figured out exactly how to correct it. I will now save this as one of my favourite snippets of code, work at understanding it properly and use...
  18. B

    Code runs OK once, but error next time

    spikepl At the very top of the VBA screen I had “Option Compare Database”. I changed it to “Option Explicit” and when I compiled I got error messages about variables that were not defined. I defined them (as Objects, right?) and the code ran OK. But it was like before. I may have adjusted...
  19. B

    Code runs OK once, but error next time

    Programming is not really my thing so I apologise for not really understanding some of the code I have pasted below. But I think I’m very close to getting this right and I just need some help to iron out a bug or two. The task is (1) output an Access query to Excel (2) overwrite that file if...
  20. B

    Exported to Excel - but my headers are missing

    Well that was a bit more than I expected!! But i found a suitable snippet, managed to work out which bit relates to the headings and converted it to suit my file. And it works, I'm delighted. Thank you so much for that pointer. I remember Bob and he helped me out several times - as have you...
Back
Top Bottom