Search results

  1. D

    Code updates combo box but doesn't update linked subform

    Pat's idea seems good, but I'm just curious why won't this work? Private Sub FormA_Button_Click() Dim combovalue As Double combovalue = Forms![FormA]![cboA] DoCmd.Close acForm, " FormA " DoCmd.OpenForm "FormB", acNormal, "", "", , acNormal Forms![ FormB]![cboB] = combovalue Dim rs As...
  2. D

    Reaching the last record...

    One thought, use error handling ReleaseResouces: rs.Close db.Close Set rs = Nothing Set db = Nothing Errorx: If Err.number = ? Then MsgBox "Congrats, Test Over" Else MsgBox err.Number & "; " & err.Description End If Resume Release Resources End Sub
  3. D

    Menus visible dependent on user

    When you say Menu, do you mean Switchboard? or do you mean MenuBar. To change Menubar of form use, Me.MenuBar = "NoEdit" For switchBoard, just disable cmdbutton to take you there? SElect Case CurrentUser Case "Joe", "Nancy", "Peter", "Bob", "Gerry" cmdFullMenu.Enabled = False...
  4. D

    Delete text from a .txt file

    Look into "FileSystemObject", under help "OpenTextFile" See all the properties available
  5. D

    Is it possible???

    Of course it's possible to use class Modules. Class Modules are Form Modules. A Standard module, is for Global functions/procedures. From VBE window, Click "Insert", from menu. Then click "Module". You are now in a Global or Standard Module. You can't Use "Me", in a standard Module. You must...
  6. D

    Wildcard for number in variant

    ejHatch, how are you performing the search? ADO uses "%", VBA uses "*" You don't need a variant, use a string dim stDocName as String You want your search criteria, to look like this "qryName Like 'qryFutureDated" & "*'" or "qryName Like 'qryFutureDated" & "%'" AGAIN, what method are you...
  7. D

    Closing a file that is already open

    Try using GetObject(). To check if open. If error occurs, Excel not open. If no error, obj.Quit Make refrence to Excel Object library.
  8. D

    Bird, Plane, No-Faster than DCount!

    Since that'e the only processing going on, in your code, I would think it's the most efficient. What's your other option, open a recordset?(no) But why DCount, you mean DLookUp? Watch your wildcard. ADO is '%', but VBA is '*'. Aggregate functions are VBA. Dim varPaid As Variant varPaid =...
  9. D

    # of Business Days in a Month

    This is a loop, but not exactly as you said? Function AvWorkDays(dteDate As Date) As Integer Dim dteLastDay As Date, dteFirstDay As Date Dim intDays As Integer dteFirstDay = DateSerial(Year(dteDate), Month(dteDate), 1) dteLastDay = DateSerial(Year(dteDate), Month(dteDate) + 1, 1) Do Until...
  10. D

    Barcodes and VBA

    Let us know which line was highlighted. I'm assuming this, try this... If vbOK = MsgBox(" Is this right?", 4) Then
  11. D

    Im Loop'd - pls Help

    I'm not positive Alloyd, but I would consider puting a DoEvents command, within eother the recordset loop, or, at least, the timer loop. Maybe both? Quote; DoEvents passes control to the operating system. Control is returned after the operating system has finished processing the events in its...
  12. D

    importing folder path and filename info into table???

    Let a message box, dislpay the sql. Is a file name, fouling things up? ... For I = 1 To .FoundFiles.Count MsgBox .FoundFiles(I) Sql = " INSERT INTO tblFilename "_ & "(fldfieldname) Values "_ & "('" & .FoundFiles(I) & "');" MsgBox SQL...
  13. D

    delete columns

    I can appreciate your point, ghudson. I just hope accesman2 got it.
  14. D

    Im Loop'd - pls Help

    I'm not sure if SendObject, accepts empty strings, but if so... strRef = rsEmail.fields("Subject").Value strEmail = rsEmail.fields("Email_Address").Value strMessage = rsEmail.fields("Journal_Notes").Value strEmail2 = Nz(rsEmail.fields("Add_Email_To").Value,"")
  15. D

    importing folder path and filename info into table???

    Yes, Bat17 seems to have hit the nail on the head. Small point, maybe irrelavent but Robert, your variable .FoundFile(), should be plural (.FoundFiles), in the INSERT statement.
  16. D

    Data type conversion - text to number & number to text.

    As Richard said. ... More specifically CInt(), CStr() Do veer away from using AScii to determine data types. Won't work, and may give deceiving results.
  17. D

    delete columns

    AccessBoy? Wrong or right ghudson, no need to be disrespectful.
  18. D

    Barcodes and VBA

    ckeezer, I'm sorry, but your objective is a little vague. So, for example, barcode 011113, has product number 111, in it. You may have product 562, and you want to find it, in other barcodes? Have you considered the InStr()? This could be very confusing. Because 111 could be found in 2...
  19. D

    Im Loop'd - pls Help

    Public Function SendallEMail() Dim rsEmail As DAO.Recordset Dim strEmail As String Dim strRef As String Dim strMessage As String Dim strEmail2 As String Set rsEmail = CurrentDb.OpenRecordset("qry_Time_Followup") Do Until rsEmail.EOF strRef = rsEmail.fields("Subject").Value...
  20. D

    Variable In-line Substitution

    ...yes, you're right. A little exagerated on my part. (the "demonstration", may have thrown me off a bit).
Back
Top Bottom