Search results

  1. T

    Evaluating if date is greater than "x" days from now

    found the problem! code works. Date was wrong!
  2. T

    Evaluating if date is greater than "x" days from now

    I have the following code Dim NewInvoiceDate as date If NewInvoiceDate > DateAdd("d", 2, Date) Then Do Until IsDate(NewInvoiceDate) And NewInvoiceDate < DateAdd("d", 2, Date) NewInvoiceDate = InputBox("The invoice date is greater than 21 days from today. Please enter a new...
  3. T

    Cancel button in input box returns error 13 = type mismatch

    I want the user to enter a year in an input box and have the following Dim ProductionYear As Integer ProductionYear = Empty ProductionYear = InputBox("Please enter the new production year", "Enter Production Year", Format(Date, "yyyy") + 1) If ProductionYear = vbCancel Then Exit Sub If the...
  4. T

    Use first record in list box in a where statement

    Found the solution! Me.lstPickingSlipsCreated= Me.lstPickingSlipsCreated.ItemData(0)
  5. T

    Use first record in list box in a where statement

    I have a command button on the form that, after running code, creates the new record in the listbox. I run Me.lstPickingSlipsCreated.Selected(lrow:=0) = True at the end of this code. I do not run it from an event.
  6. T

    Use first record in list box in a where statement

    Where do you have the LOC to set the first row as selected?Me.lstPickingSlipsCreated.Selected(lrow:=0) = True Multi select = None
  7. T

    Use first record in list box in a where statement

    This is my problem! When I add a new record then I want the first row. However I also need to allow the user to select any record from the list box, and the WClause must reflect this
  8. T

    Use first record in list box in a where statement

    I have code that adds a record to a list box. I then select the new record usingMe.lstPickingSlipsCreated.Selected(lrow:=0) = TrueThe new record is always the first record, and headers are not shown On the form I have a button to print a report for the record selected. I create a "where" clause...
  9. T

    Prevent user navigating from a field in entry is invalid

    I need to ensure that the data entered into a field on a form is correct. The field contains an email address and I have a function to check if the format is correct. If the format is incorrect I need the cursor to return to the field in that record. The form is continuous. What event should...
  10. T

    Get list of files names on a ftp server

    GetFTPDetails populated the ftp details like domain, user name, password and folder locations Public Sub GetFTPDetails() pubInternetDomainName = DLookup("FTPDomain", "tblCompanyDetails") pubInternetFTPUserName = DLookup("FTPUserName", "tblCompanyDetails") pubInternetFTPPassword =...
  11. T

    Get list of files names on a ftp server

    I have the following very neat code to get the names of the files on an ftp server Dim myFolderItem As FolderItem Dim myFiles As String GetFTPDetails myFiles = "" For Each myFolderItem In ftpList(pubInternetDomainName & "/" & pubWebOrderDownloadOrdersFromInternetFolder & "/"...
  12. T

    Use of bookmarks in form recordsetclone

    I have never used bookmarks! I want to create a recordset clone on a form, loop though each record and verify data entry. This is what I have:Set rstForm = Me.RecordsetClone With rstForm .MoveLast .MoveFirst Do Until .EOF If IsNull(Me.cboSalesAreaId) Or...
  13. T

    Prevent duplications in two tables

    One table is called tblReps and the other tblCustomerContacts I don't see how I can create a single table
  14. T

    Prevent duplications in two tables

    I need to have the field "UserName" in two tables. I cannot have the same UserName in both tables. I have indexed the field to "No Duplicates" in both tables to prevent duplicates at that level, but how can I check to see if there is a duplicate in the second table? Many thanks
  15. T

    show customers who have not purchased product for "n" months

    FOUND IT! DateAdd("m",3,Date()) should be DateAdd("m",-3,Date())
  16. T

    show customers who have not purchased product for "n" months

    Sorry but I have got myself in a knot!:banghead: I have the table tblInvoice which contains the fields CustomerId and InvoiceDate I want to create a query that returns all customers who have not been invoiced in the last 3 months. I have tried:SELECT tblInvoice.CustomerId...
  17. T

    Clear selections in list box based on another list box

    On a form I have two list boxes. The recordset for the second list box is based on the record selected in the first list box When I select a record in the fist list box I want to clear any previously selected record in the second list box. I have tried the following: Private Sub...
  18. T

    Get Last (Max) record in table

    I have the table tblPO that contians the fields PO and SupplierId. Records in the field PO include: T1, T6, T9, T12 I need a query that will return the max PO, in this case T12 I have tried: SELECT SupplierId, Max(PO) FROM tblPO; But this returns T9 How do I get the query to return T12?
  19. T

    Microsoft excel Versions

    Thanks, this can work but I still need to save the Excel spreadsheet in a format the user can read. They have Excel 2000 and I have Excel 2010 I also get an error when opening a query that refers to a control on a form. No records are returned in line: Set MyQueryDef =...
  20. T

    Microsoft excel Versions

    I need to export data into various versions of Excel. The user needs to select the correct version. I have created a combo box and set the row source to: "14; Excel 2010; xlsx;12; Excel 2007; xlsx;11; Excel 2003; xls;10; Excel 2002; xls;9; Excel 2000; xls;8; Excel 97; xls;7; Excel 95; xls"...
Back
Top Bottom