Search results

  1. S

    New record

    Hi All, How do I make the windows default navigation work to the following:- Next record that navigates to next, but does not create a new record when at EOF New record that creates a new record. I've tried turning off 'Allow additions' for the form, but that turns off the 'New Record'...
  2. S

    Question Used rows in an excel sheet

    Hi All, I have the following code which returns me the number of rows in an excel sheet:- Lastrows = .Worksheets(1).Cells.Find(What:="*", SearchDirection:=2, SearchOrder:=1).Row How do I mod the code to find the last 'used' row in the sheet? The sheet is automatically generated daily, so...
  3. S

    Passing values from Child to parent

    Hi I have a variable tempnum on a subform which I want to pass into a textbox on the main parent form. I cant seem to get it right. Here's my code Me.Parent.Parent![List num].Value = tempnum Hope you can help
  4. S

    Arrays within a cell

    Hi What's the best way of storing arrays of data within a cell? Or should I be creating fields to the size of the array. The size of the arrays are unknown at the moment, so I'm wondering the best way to go. Hope you can help
  5. S

    loop for labels invisible/not invisible

    Hi, I'm trying to get some labels and eventually text boxes to become visible on an input of a qty in a text box, but I can't get my syntax right. Hope someone can help. The labels are numbered pumplbl1, pumplbl2 etc Here's what I have so far. Private Sub More_qty_AfterUpdate() Dim count As...
  6. S

    Load record event

    Hi guys, I want to run some vb code when I use the next/back/new buttons on the defult windows navigation at the bottom of a form. How do I run that code? is there a Form_load() type function I can put it in?
  7. S

    Navigation bar

    Hi guys, how do I get access to the default navigation buttons on a form ie back, forward, new and last buttons. I want to right some VB code that acts when the buttons are pressed. How do I do it? I don't really want to create my own buttons and do onclick events Thanks
  8. S

    Question excel search

    Hi Guys, How do I search an excel spreadheet (temp.xlsx) for a given variable (customer.value)? The variable will be in say field I. Once I find it then I've got to pull that rows data out. I've managed to open an excel sheet and pick a cell and return customer data by the following, but I...
  9. S

    Dmax()

    Hi Guys, I'm using Dmax() to return a max number in a field which I then want to inc by 1 for a new record. Dmax is returning 999. I believe Dmax therefore thinks it's a text field. So where do I change this to a number field?
  10. S

    Question Sub forms

    Hi All, I have a form 'A' which has six edit buttons. On pressing any edit button I want to open form 'B' which I can do. On starting form 'B' though, I need to change the control source (depending on which edit button was pressed) which I do by the following, but how do I lead into the code...
  11. S

    Access to excel report

    Hi All, I'm trying to write a VBA function to write a table to excel but with filters. I'm using the Docmd functionality but can't find where I filter. Here's what I have so far:- Private Sub Command344_Click() DoCmd.OutputTo acOutputTable, "Joblog", acFormatXLS, "C:\Temp\temp1.xls"...
  12. S

    Question Update record

    Hi all, When using Access 2007, I have a new record button, but that record is only written to the db once you navigate away from it. How do I write immediately to the DB, so that record is saved without navigating away from it. I believe I can use ADO or DAO but I'm having difficulties...
  13. S

    Question Listbox deselect

    Hi All, I have a listbox in access 2007 and I'm wanting to deselect an item if it is clicked again. ie If I have a list, click once to select an item, then if you select the same item, click it, it then deselects it. How do I get that working? I've tried:- List383.Value = -1 and...
  14. S

    Check box event

    Hi I hope someone can help. I have a checkbox which when checked then turns textboxes to locked as below. However when I navigate to the next record which may not be checked the text boxes remain locked. I obviously want to lock the boxes depending on each record. I am navigating via the...
  15. S

    Testing folder for a value

    Hi, This code below works, but alot of what it does is unnecessary. I have a directory structure named 1000-2000, 2001-3000, 3001 - 4000 etc and within that is the individual folders 1000, 1001, 1002 etc How do I test to search top level folder thats no larger than correctNum to then test...
  16. S

    get directory

    Hi I'm trying to check a directory for a folder name which has a certain string in it (RecNum) However the fso object filesys.FolderExists does not take an argument when looking for part of a folder name on a particular path. What I basically want to do is look in a directory for a...
  17. S

    Copy folder

    Hi I'm looking for copy folder functionality and I can't find anything. In access 2007 when I push a button on a form, I want to copy a network folder to another location and rename it. Anyone any ideas? Thanks
  18. S

    Max value

    Hi I'm trying to do a sect statement and put it in a variable which i can then output to a text box. How do I get the value into a variable? I can't seem to get my syntax right this is what I currently have Maxvalue = "SELECT MAX[Record Num]FROM Joblog"
  19. S

    Variable in a select query

    Hi Im trying to pass a list box variable in a select query. I understand you cannot pass a variable directly but have to pass it through a function. I may be wrong in this, but whatever I do I cannot get it to work. Here's my code:- Public Sub GetEquipment() List387.RowSourceType =...
Top Bottom