Search results

  1. J

    Detecting modifier keys inside a button's On Click event

    Afternoon folks. Apologies if this is the wrong subforum; as always in my case, this question could be either construed as a form question or a VBA question, for once I've stuck it in the VBA section. A button's On Click event on one of my forms runs a For...Next loop that I want to break out...
  2. J

    Export an Access query to an existing Excel spreadsheet in VBA

    Guys...quick question. I know how to export an Access query to a new Excel spreadsheet using the DoCmd.TransferSpreadsheet method, but is there a way to make a new tab in an existing spreadsheet and export it to that? If not, then my users are just going to have to put up with copying data from...
  3. J

    Running code after a form fully opens

    Sorry guys, second question of the week :o I've got some code that I want to run automatically when the user opens a form. The code updates a progress bar control on the form, so I need the form to be fully drawn before the code runs. So far I've tried On Current, On Load, and On Open, all of...
  4. J

    Opening & formatting Excel spreadsheet from VBA

    Struggling with something that should be obvious. I'm trying to open, format and save an Excel spreadsheet in the background from Access. Everything's working fine other than the conditional formatting lines. They don't return an error but they simply do not work for no reason I can figure...
  5. J

    Table manifest

    All I'm trying to produce some system documentation for one of my databases, and I'm struggling to find out how I can get Access to export (or even print) basic manifest information for the tables. For example, when you open a table in Design View, I'd like to be able to bulk-export at least...
  6. J

    Passing data from a form back to the module that called it

    Hi guys, Sorry it was difficult to know if I should post this to forms or modules. I have a VBA module which imports data from a CSV file into an import-buffer table. When the data has been imported into the buffer table, the code uses docmd.openform to open a form which shows all the data in...
  7. J

    Data validation of a field in an existing table

    Guys you usually come up trumps and save my bacon so I'm hoping you will again. I'm trying to write a query that will validate a field in an existing table. I want the query to show where any of the 412,000 records fail this strict validation: AAnnnnnnA ...where A is any letter A-Z and n is a...
  8. J

    Removing duplicate records

    Guys I'm having a problem removing duplicate records from a table. It should be easy but I can't suss it. This is an example of the data in my table: Ref Date Status 1130071 11/06/2015 Do Not Pay 1144543 06/07/2015 Do Not Pay 1157607 14/05/2015 Do Not Pay 1165207 05/05/2015 Do Not Pay...
  9. J

    iif function in a report textbox returning #error...why?

    Hello all, can I run something really simple past you? I can't for the life of me figure out why it's not working. The source query for my report has a field called Sort Code. If I put a text box on the report and type its Control Source as [Sort Code], sure enough the report displays the Sort...
  10. J

    Re-centre a form?

    Guys, sorry it's a along time since I posted, and I only ever seem to post queries. The short tale is that I've written VBA code that hides or shows certain fields on a form depending on whether the user ticks a checkbox in the form's header. I've already written code that shuffles the columns...
  11. J

    Checking for key presses in an On Click event

    Guys this should be simple, but isn't. I have a button on a form and I want the On Click event behind it to check whether Shift is also being pressed when the user clicks the button (or Ctrl, or Alt, in fact any damn key will do). I can't believe that there isn't a function in VBA like the old...
  12. J

    Accessing a report's recordset from VBA

    Morning chaps I have another query regarding recordsets and reports in Access 2003. I have a report linked to a query. When the report opens, I want to use some VBA behind the scenes to interrogate its recordset. I’ve done this before without difficulty by opening a report’s query as a...
  13. J

    I don't want my form to automatically update a table?

    there must be an easier way of doing this I have a form linked to a table. I want users to be able to enter data in the form but I do NOT want the form to update the table until the user clicks an 'ok' button. Ie I don't want the table updated if they cancel out of the form. What's the easiest...
  14. J

    Event query

    Hi guys...another query to test you all :) What event happens when someone is typing text in a textbox and then they hit <Enter>? The textbox is set to receive a single line of text, so pressing <Enter> causes the textbox to loose focus. Obviously the 'Lost Focus' event happens but I want to...
  15. J

    Linking tables via VBA

    Hi Guys... Long time, no post...sorry, sadly I only tend to post on here when I get stuck :o I'm trying to link tables in two databases (ie a front end and a back-end holding the data) using VBA. I've already had success with this using in my front end: DoCmd.TransferDatabase acLink...
  16. J

    Resetting forms

    Hi there gurus... I have made a form with various text-boxes, radio-buttons and other controls on it. The form is not bound to a table or query: I'm just using the form as a data-gathering device for my VBA code. After the user has entered the data I want to use a button to reset the boxes...
  17. J

    Errors compiling Access 97 modules

    I'm trying to compile my modules in an Access 97 database using Debug/Compile All Modules, but it's coming back with the error "Method or Data Member Not Found" wherever I've used the .OldValue property. The code works fine, so what's the issue with compiling it? The reason I'm trying to...
  18. J

    Access 97 DB exclusive access

    Hi folks I've got a DB on a LAN which doesn't need to be p/wd protected or anything, but I want to restrict access to it to only ONE USER at a time. The users are using Access 97 on Win 95B I've tried going into Tools/Options/Advanced and selecting "Exclusive" as the Default Open Mode, but...
  19. J

    How can I tell if Excel is installed using Access 97 VBA?

    Hi folks, me again. I'm building a form for the client which will allow the results of a query to be exported to Excel using a button on the form. No problem exporting: sussed how to do that. What I want to know now is how can I tell using Access 97 VBA if the client has Excel installed on...
  20. J

    Access 97 custom toolbars/menus

    Hi folks I’m a newbie here so treat me gently :) I’m trying to build an application in Access 97 with a customized toolbar. I have created the toolbar through View/Toolbars/Customize… and the options on the various menus I have created invoke macros which in turn open up forms and/or run VB...
Top Bottom