Search results

  1. B

    Exported to Excel - but my headers are missing

    Hi, I'm a complete newbie at getting VBA to export from Access to Excel, but after looking at other threads here and elsewhere, I have cobbled together the following, which does most of what I need. The data is pasted in cell B1, but there are no column headings. Dim rs As dao.Recordset Dim...
  2. B

    VBA to set filename/location in Save As dialog

    Thank you. That works great. I never knew there was such a thing as acFormatPDF and I had cobbled my code together from something I picked up on this forum several years ago. We have recently upgraded to Access 2010 and I wonder if it's a new feature. Thanks again!!
  3. B

    VBA to set filename/location in Save As dialog

    Hi, The code below sets my printer to "Cute PDF writer" and then opens a report in print view, which creates a PDF version of my report. So far so good. But just before the last step, it brings up the Save As dialog box, asking for a filename and location. Three points are important: I...
  4. B

    Unhide hidden fields

    Just re-read your question and realised you have Yes/No rather than 1 or zero. But hopefully you get the idea. If Field1. Value= "Yes"
  5. B

    Unhide hidden fields

    Typing this on my phone, so not 100% sure of every part, but the gist is as follows. Open form in design view,select Field1 and click Properties. Under Events, click the three dots on the After Update line and then select Code Builder. The first and last lines of the code will be completed for...
  6. B

    Loop through table and create filenames

    Thank you. That certainly helps with the "Do while" part of things. I'm going to copy and paste that code into my "Help" file, as I can see that will be really useful for lots of things in future. I have looked at that MSDN link and I think it will be useful too. It will take me some time to...
  7. B

    Loop through table and create filenames

    Hi namliam, Thanks for the suggestion. But the report is already built in Access and has been through a period of careful formatting to make sure it’s right for all users and contains headings, charts, tables, text-boxes etc. So exporting to Excel is not really going to work for me. I’m...
  8. B

    Loop through table and create filenames

    I have a VBA routine that runs some queries and then creates a report as a PDF document using my virtual PDF printer. At this point it brings up the Save As dialog and I give the file a name and select a folder to store it in. But I run this report 30 times for 30 different parameters. The...
  9. B

    Mail Merge

    Sorry, when you said you had check-boxes relating to each category, I assumed your fields were Yes/No. Is Business_Description a text field, with a combo box for data-entry? If so, I would use the same combo box on your mail-merge form and have the query return results based on the choice...
  10. B

    Mail Merge

    I would use a query, based on the check-boxes, to return the addresses I wanted. E.g. if you have check-boxes for Rock, Pop, Jazz etc. or maybe Local, National, then your query should limit the results it returns from the Contacts table to those records where the box is ticked. Put "True" or...
  11. B

    Automate "Save As..." based on listbox entry

    I have a listbox on my form with 30 options, referring to clinical specialties, cancer, diabetes etc. These options come from tblSpecialties. I have a command button which: Turns warnings off Runs various make-table queries, each of which refer to that listbox “Prints” a report to my PDF...
  12. B

    Does this "blue" have a code?

    Sorry guys, I had evidently strayed into far deeper waters than I'd thought. I don't wish to appear ungrateful, as I have learned almost everything I know about Access from this site, often from you two, but on this occasion I'm going to just use the blue I know the code for. "Declare private...
  13. B

    Does this "blue" have a code?

    Um... I think I did. The code for the OnClick event of one of the buttons is now as follows: Private Sub cmdPreValid_Click() 'Show the pre-valid subform and hide the other two 'Me.frm01_PreValid.Visible = True 'Me.frm01_PreValid.Requery 'make sure it has the latest data...
  14. B

    Does this "blue" have a code?

    I'm trying to get the colour of the button itself which is called cmdCurrent. I have three buttons that switch between different views of data and I want the currently active button to be yellow. So I have code like this: 'Change the colours of the buttons Me.cmdPreValid.BackColor = RGB(255...
  15. B

    Does this "blue" have a code?

    That results in an error message. "Run-time error 2462. The section number you entered is invalid."
  16. B

    Does this "blue" have a code?

    Sorry - I may have given the impression I know what I'm doing. I don't!! I believe I need to press Ctrl+ G and then type Debug.Print....something??? What's the syntax? The name of the button is cmdCurrent Thanks
  17. B

    Does this "blue" have a code?

    Where can I find the Hex or RGB value for the blue colour that Access 2010 uses by default for buttons on forms? I need to change some buttons to yellow (I know the code for that) but later change them back to the previous shade of blue, which is shown in the Properties pane "Accent 1, Lighter...
  18. B

    Link to data on another Network?

    CJ_London: Thank you so much. Brackets, dots, quotes, etc. are where I always go wrong, so I appreciate the edit. It may be the middle of next week before I get a chance to test that, so I just wanted to come back before that and say thanks. I’ll let you know how I get on. AccessBlaster: No...
  19. B

    Link to data on another Network?

    Thanks for that, but I might be getting out of my depth here. The bit I should have added was "I'm not really IT people either, more of a hack who likes to have a go". I just googled it and didn't follow much of what I read, but are you saying I could run some code like below, assuming the...
  20. B

    Link to data on another Network?

    Sorry if the following is a bit long-winded!! I have a database split FE/BE where the front-end sits on my laptop's desktop screen and connects to a back-end at my employer's head office, when I'm there 1-2 days a week (I don't need it at my usual office.) Several colleagues at other branches...
Back
Top Bottom