Search results

  1. D

    Variable In-line Substitution

    IKKF, No, I don't believe you can alter a variable's name, programmatically. IKKF, excuse the criticism but, BUT, YOUR CODE IS COMPLETELY ERRONEOUS!!! Not one line makes sense. Maybe one "intX = intX + 1", and it's redundant If I were you, I would use ONE recordset object, and reset it, 6 X...
  2. D

    e-mail problems

    PS, I believe you can access the Send Folder, to create a log in access. check out the Outlook Object model. If not, before you send, append data to a log table?
  3. D

    e-mail problems

    Your program should very well, control CC, BCC, To, Message & Subject You're using automation? Set appOutLook = CreateObject("Outlook.Application") Set itm = appOutLook.CreateItem(olMailItem) With itm .To = strEmail .CC = "royRogers@Hotmail.com"...
  4. D

    Attaching files to email

    Outlook Automation. Do search On-Line. Don't forget to set reference to Outlook Library.
  5. D

    Have User input WHERE criteria in an OpenRecordset method

    Like llkhoutx said. More specifically, your SQL would look like this,(if you decide to use a popup Form(recommended) ("SELECT [Net] FROM [tblRecap] WHERE [Yr] = " & Me.txtYear & " AND [Event] = " & chr(34) & Me.txtEvent & chr(34) & ")"
  6. D

    Report Names

    oops, a little rusty there.... intReports = CurrentProject.AllReports.Count
  7. D

    Report Names

    You have to open the reports collection first, before accessing its properties. Dim db As Database Set db = CurrentDb intReports = db.AllReports.Count
  8. D

    DateTime stamp for a field, not a record.

    In the AfterUpdate event, of the field, put , txtField = Date Even easier, directly from the properties dialog, Events tab, for the after update event put, =Date()
  9. D

    Using the value returned by a SQL Query in VBA

    As Bat said, or, varResult = DLookUp("MyData","MyTable")
  10. D

    Input Message Box

    Yes Peter is correct, mind you, in case this is relavent, pressing Ok, with no response will also return "". So to differentiate, more precisely... If vbCancel = InputBox("Pick Number From ....",vbOkCancel) Then .... or Dim varResponse As Variant varResponse = InputBox "Pick Number From...
  11. D

    Dlookup prob

    DanInTheMix & Rural Guy, excuse the interjection, I just wanted to add that, the Change event, is only accurate with a textbox's Text.Property. In other words, you should've been writing this... "[Serial Number]=" & "'" & Me![Serial Number].Text & "'") But, like Rural guy said, why keep...
  12. D

    Searching for a Range

    OxDavis, No, it was an oversight on my part. You're right, it should be, Dim intAge As Integer...
  13. D

    Filter Combo box on form open event

    wattsaj, ultimately, we need to see the current rowsource for the combo. Private Sub cmdOpenOrders_Click() Docmd.openForm "Frm_Orders" Forms!Frm_Orders!sub.Form!CostCodeID.Rowsource = _ "SELECT Repairs FROM Tbl_InvoiceCostCodes ORDER BY Repairs" End sub
  14. D

    Sending E-mails

    A rather simple error, you switched your variables. Look where you have strRecipient & strEmail... 'Email Details .To = strEmail .Subject = "Greetings " & strRecipient .Body = vbCrLf & _ "Dear " & strRecipient & "," & vbCrLf & vbCrLf & _ "Put your message Here" & vbCrLf & vbCrLf & " "...
  15. D

    Searching for a Range

    you could try either... If IsNull(Me!cboAgeFrom.Value) Then strAge = "Like '*'" Else: strAge = "Between " & Me!cboAgeFrom.Value & " AND " & Me!cboAgeTo.Value End If Or something like... If IsNull(Me!cboAgeFrom.Value) Then strAge = "Like '*'" Else: strAge1 = ">= " &...
  16. D

    Dlookup prob

    Danitm, I agree with RuralGuy, It's not working correctly. But, out of curiosity, you wrote... ..."CK99901, and someone enters CK999... " Are you implying, someone enters "CK999", or "CK999__". What result do they get, the typed, Serial Number?
  17. D

    Help Needed

    KDa, you could on the BeforeUpdate_() event , of whatever field you choose, to have the Validation rule, use a nested, "If Then" statement. Private Sub Date_Of_Boooking_BeforeUpdate (Cancel As Integer) If Me.Booking_Type = "Occasional" Then If Date_Of_Boooking <> ...Validation...
  18. D

    My code works when it wants to?

    Nice Pat, didn't occur to me to use the Format property. ...wouldn't have anticipated such a result. Thx!
  19. D

    My code works when it wants to?

    It appears to be a refreshing/locking issue? I see you have rs.Requery, in order to save the newly inserted record. Is there a form open, using the same recordset, not allowing complete iteration through the table? strSQLWhere is not sorted, could that make a difference? Sorry for the lack of...
  20. D

    number of records?

    If you save the Query in the database, then yes. Let's say you call it "qryt1", then your DCount would look like... =DCount("id","qry1").
Back
Top Bottom