Search results

  1. B

    VB Code for Excel and Access

    Help me! Does anyone know of anyway that VB code can be written in an Excel application, so that it copies data from an active Query in an Access database application, and then pastes those records onto the Excel sheet????? Thanks, D
  2. B

    Criteria Query Combo Box

    Hi. I have a report that is based on a criteria query. The user is asked for machine part and site. Right now the user has to manually type in the site and then the machine part required for the report. Is there anyway for the user to be presented with a combo-box pulldown menu instead of...
  3. B

    Excel type Question

    Sorry but this is an Excel type question, but it's important!!!!!!!!!!! Basically I have a query in Access that has a bunch of records with dates attached to the records. I have to copy and paste the records into an Excel spreadsheet. Grand. But some dates get screwed up. The dates in the...
  4. B

    Parameter Query Not Working

    Hi. I have a query that is drawn from a master table. In the query there is a field for date. In the field for date I have it formatted as: Date: Format([Time of fault],"Short Date") Grand. But when I put: Between [Start Date dd-mm-yy] And [End Date dd-mm-yy] into the creteria field to...
  5. B

    Run a .bat file

    Hi! Quick question. I have a .bat batch file that performs a task. Is there anyway in an Access form to activate the batch file when a button is pressed. I tried OnClick in Event by can't find an option for a .bat file. Thanks, D
  6. B

    Adding a Month

    Hi! Basically I need to know the VB code behind a form that adds one month to a certain date. So the user types in a date into a date field, and then in the code behind the Form I want it to add one month to that date and save it in the table. Does anyone know how this can be done...
  7. B

    After Field Update

    Hi! Basically I need to know the VB code behind a form that adds one month to a certain date. So the user types in a date into a date field, and then in the code behind the Form I want it to add one month to that date and save it in the table. Does anyone know how this can be done???? Thanks, D
  8. B

    Creating Duplicate

    Hi! This is my boggle: Basically I have a form that the user input into. They input 3 fields. E.g. Incident Type, Site and Date. Grand. I want to create a report based on a creteria query that sorts the data based on date. So the user inputs a start and stop date and all the records betwen...
  9. B

    Regular Reminder type thing

    Hi. Any ideas anyone: Basically the user inputs into a form when they did a particular site maintanence e.g. "Did monthly left engine check on 12/6/02". The user inputs this weekly/monthly/bi-monthly etc data into a form when they do it. All that's grand. I want the database to create a...
  10. B

    Array with a Loop!

    Hi! Kinda of an Excel type VBA question, sorry!! Basically I have a string array declared as: Dim MyArray(5) As String MyArray(0) = "BG1" MyArray(1) = "BG2" MyArray(2) = "BG3" MyArray(3) = "BG4" MyArray(4) = "BG5" Anywho, in the code I need to loop through a particular...
  11. B

    For Each Array()

    Hi. This is a VBA program in Excel, but I hope someone could still help me??!! I've got an array that contains 6 Strings. I declare it as follows: Dim MyArray As String MyArray = Array(BG1, BG2, BG3, BG4, BG5, CP1) I also have a block of code that performs a certain task. I want...
  12. B

    Selecting a Query

    Hi! Basically I need to know how to select a particular query in code, so I can copy all the records onto the clipboard. The query is called Car, so up until now I've been typing; Sub Copy() Car.Selection Selection.Copy End Sub or Sub Copy() ActiveQuery.Selection Selection.Copy End Sub...
  13. B

    Selection.Copy

    Hi! This is really a VB question in Excel, but I hope someone can still help me??? Basically I have some code that copies the contents of cell E1 in Sheet B, and then pastes that numerical value to cell B1 in Sheet A. The trouble is that I'm copying a cell that is a sum of other cells i.e Cell...
  14. B

    Text on Button

    Hi! Basicall I neet to put a good bit of text on a button. I want to put it on two different lines but when I press return it exits text edit. I tried putting text labels on the buttons, but when the button is pressed, these labels fall behind the button and can't be seen. When I just keep...
  15. B

    If statement

    Thanks that static thing worked :) Another Excel VB question coming, sorry! Basically I have to check if the first letter in a cell is either D of G, and then perform an action. But I've tried this and it doesn't work: If Selection = "D" & "*" Then Do something ElseIf Selection = "G"...
  16. B

    Looping

    Hi. More of an Excel question, but someone might be able to help?? Basically I have a column of cells whose value is determined by the formula =B2 & C3 & C3 and the next cell - =B2 & C4 & C4 and then =B2 & C5 & C5 and so on. So that the first part always stays the same, and the last two...
  17. B

    Copying a query

    Hi. Basically I have to write a macro that opens a specific query and then copies all the records onto the clip board. It's the only way of doing it. Does anyone have an idea of what the code would be like. E.g. Opening a query in VBA etc.. Thanks, D
  18. B

    Help!!

    Hi ya, Basically, I have a variable that I want to use in two different Subs. I declare them as being public i.e. Public month As Integer ...but I get an error saying; "Invalid attribute in Sub or function" What can I do??? D
  19. B

    Wildcard???

    Hi! Basically I have to import a number of files from a directory in the C: drive. All of the files have a standard form, for which I've written code to loop through the folder. But now the files will be having a five digit random number added onto the end of their names. I've tried writing...
  20. B

    Importing files???

    Hi!! Not strictly Access, but maybe someone can help. Basically I want some VB code to import the contents of a folder. The folder will contain about 30 files. Is there anyway to just say - import all of the files in this folder one after another - without acyually knowing their name>>>>...
Top Bottom