Search results

  1. 1

    Keeping an input on a field the same after it's been submitted

    Ohh OK, I see. This is mostly just for myself but I'll bear it in mind.. I know what you mean about being consistent as I had to modify an exising database a few days ago and none of it was clear and there were no comments in any of the code to help me out. Well I'm here on work experience and...
  2. 1

    Keeping an input on a field the same after it's been submitted

    Ohhh OK I don't really know VBA so I presumed the txt was part of the script.. it works now I've taken the "txt" out, thanks a lot :D
  3. 1

    Keeping an input on a field the same after it's been submitted

    I made a simple button and the VBA in the OnClick property is: Dim strPrevProductID As String strPrevProductID = txtProductCode DoCmd.GoToRecord , "", acNewRec txtProductCode = strPrevProductID The field which I want updated is ProductCode. This button will add a new blank record fine but...
  4. 1

    Keeping an input on a field the same after it's been submitted

    It's nothing to do with dates - it's basically a product code but the first 9 digits are usually the same for similar products and so the person processing the products would have to type these 9 letters out again for 20 products or so. It would be easier if the previous entry stayed there after...
  5. 1

    Keeping an input on a field the same after it's been submitted

    Basically, I have an input on my form which is related to a field and most of the time (2/3 of the time I'd guess), the person using the form will have to type a 9 digit number in but this number varies with no pattern so setting the field's default value is no help. Is there a way to make it...
  6. 1

    Parent/Child relationships

    I've been asked to make a database which does the same job as the attached excel document. Someone on a machine enters the details of the job they've just done like the length of the metal and the alloy it was and it should all get stored. At the top of the page, there's the information...
  7. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    Perfect! Thanks a lot :D
  8. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    OK I added "Microsoft Office Excel 14.0 Object Library" but when I click the button and your code runs, I get the error: Run Time Error 9: Subscript out of range and it highlights the line xlApp.Workbooks("budgets").Close False :confused:
  9. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    Compile error: User-defined type not defined. What do you mean by adding a reference to the excel library?
  10. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    Seems to do the job with loads of excel files open - thanks :) Sorry to be a pain, though - it asks if I want to save when the button is clicked when I really just want it to just disappear without saving.. how can I stop it from asking?
  11. 1

    Rounding number up to half hour

    If you call that result in your query "Unrounded", use this: Rounded: 0.5*INT(2*[Unrounded])+IIF((2*[Unrounded])-INT(2*[Unrounded])>0.5,0.5,0) edit: Oh, you got is sorted. Your way is better I guess. I don't really know many functions, I just worked out how you'd do it with what I know.
  12. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    Maybe I wasn't clear - I want to close the excel file from an Access form..
  13. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    I put the code into the on click section of the buttoncalled "view": Private Sub view_Click() Workbooks("budgets.xls").Close True End Sub Clicking gives the error: "Compile Error: Sub or Function not defined"
  14. 1

    Simple VBA - if worksheet "budget.xlsx" is open, close it

    Access VBA - if worksheet "budget.xlsx" is open, close it Hi, I have a button on a form which the user presses when they're done in access. How can I make it so that when clicked, this button will close an Excel workbook called "budget.xlsx" only if it's open? I can close Excel files from...
  15. 1

    Macro to export table in the same folder as the .mdb file

    Where does this go?
  16. 1

    Macro to export table in the same folder as the .mdb file

    I'm running Access 2010. I have a macro which exports my table "tbl_orders" as an excel file called "orders.xls" (I'm exporting for graphing purposes). The details are: ExportWithFormatting Object Type: Table Object Name: tbl_orders Output Format: Excel 1997-2003 .xls Output File: ??? Auto...
  17. 1

    Importing data from an access query into excel

    In Excel 2010, I go to Data -> From Access -> database.mdb -> hit OK -> hit OK What pops up is a list of all the tables in my access database when what I really want to be able to do is select a query instead of a table and display the table of results from the query in excel. Is there a...
  18. 1

    Creating a timeline/Gantt chart in access

    I have made a calculator (for a factory where I'm doing work experience) in access and it basically works out how long a specific task will take to be completed depending on inital conditions etc. My query datasheet view basically has the fields: Task ID; Priority; Duration With the way that...
Back
Top Bottom