Search results

  1. L

    Anyone know how to...

    DoCmd.OpenReport ReportName, acViewPreview DoCmd.RunCommand acCmdZoom10 DoCmd.RunCommand acCmdZoom25 DoCmd.RunCommand acCmdZoom50 DoCmd.RunCommand acCmdZoom75 DoCmd.RunCommand acCmdZoom100 DoCmd.RunCommand acCmdZoom150 DoCmd.RunCommand acCmdZoom200 DoCmd.RunCommand acCmdFitToWindow
  2. L

    Search Facility

    Try this code: Private Sub txtSearch_Change() Dim txtSearchString As Variant Dim strSQL As String txtSearchString = Me.txtSearch.Text & "" strSQL = "SELECT DISTINCT LastName, FirstName, [Parish Number] FROM [Personal Details] " strSQL = strSQL & "WHERE (LastName Like '" & txtSearchString &...
  3. L

    Email Reminder

    Here are some thoughts... I would recommend you (if you don't mind) to use prefixes before tables, forms and etc.; and not to use spaces in object and field names... As far as I remember DoCmd.SendObject use default email client and it can be not only Microsoft Outlook. If this command does...
  4. L

    Using + or- key to increment number or date in a text box

    Hello, This is one more piece of code that you can use to set up date. - enters current date. This code should be saved in a module. Public Sub SetDate(tboControl As TextBox, KeyAscii As Integer) Dim strCharacter As String strCharacter = Chr(KeyAscii) If strCharacter =...
  5. L

    Set Outlook reminder from Access form

    Try to use the following object variable initialization: Set objOutlook = GetObject("", "Outlook.Application") instead of this: Set objOutlook = CreateObject("Outlook.Application")
  6. L

    Email Reminder

    Once you can make a query, could you please post it here? I suppose that it looks like: SELECT Task.PRIMARY, Task.[TASK DESCRIPTION], Task.[START DATE] FROM Task WHERE (((Task.[START DATE])>=Date()-7)); Isn't it?
  7. L

    Link to tables via code

    Here is my example. Hope, it will be useful for you. Public Function LinkTablesToProperDrive() Dim tdf As DAO.TableDef Dim strPath As String strPath = ";DATABASE=\\server\MyDB.mdb" 'strPath = ";DATABASE=C:\MyDB.mdb" For Each tdf In CurrentDb.TableDefs If Len(tdf.Connect) > 0 Then 'Linked...
  8. L

    Stumbling with a sql insert

    :rolleyes: Regarding the joins... it is simple. ALL records will be selected from a table which is named in JOIN type. tblOne LEFT JOIN tblTwo - all records from tblOne (tblOne in LEFT position in this string) tblTwo LEFT JOIN tblOne - all records from tblTwo (tblTwo in LEFT position in...
  9. L

    Stumbling with a sql insert

    I think, instead of "INSERT INTO" statement you should use "UPDATE". Try the following: UPDATE tblTwo INNER JOIN tblOne ON tblTwo.Sname = tblOne.Sname SET tblTwo.Address = tblOne.Address , tblTwo.City = tblOne.City, tblTwo.etc = tblOne.etc; Over.
  10. L

    change listbox rowsource using vba

    Wayne, It is very strange... I have never seen the cases you described. It would be interesting to try it. I even heard the opposite opinion that sting Me.lst.RowSoursce=Me.lst.RowSoursce sometimes works better than .Requery :) By the way, I have another "Demo" to support my point of view -...
  11. L

    change listbox rowsource using vba

    Wayne Ryan, You are always welcome. The attacment is a db I've just made to show that .RowSource works without .Requery. It is MSA 2000. Please show me where .RowSource doesn't work. Thank you. lobo :)
  12. L

    Email Reminder

    Could you please post your database in MSA 2000 format?
  13. L

    Email Reminder

    An idea: you can create a table and keep the information regarding the e-mails that were sent. When the form is loaded - check the table and find if the e-mail was sent today.
  14. L

    change listbox rowsource using vba

    1. There is no space before "FROM" in the original SQL string... 2. There is no need to make Me.lstReferrals.Requery once you just set Me.lstReferrals.RowSource = strSQL 3. To debug the code and to see just made SQL string, use Debug.Print strSQL before Me.lstReferrals.RowSource = strSQL, then...
  15. L

    Pass multiple values to query

    I would suggest the following SQL string: SELECT ... FROM ... WHERE LocationID In ([MyParameter]) where MyParameter can accept a single value and several comma separated values as well. But what is going on when you leave the textbox empty? IMHO it is better to make up SQL string dynamically...
  16. L

    send more then one attachment

    Try this code: Dim oul As Outlook.Application Dim mli As Outlook.MailItem Dim atts As Outlook.Attachments Set oul = GetObject("", "Outlook.Application") Set mli = oul.CreateItem(olMailItem) mli.To = "Bla@Bla.com" mli.Subject = "Access Report" mli.Body = "Please find the attachement"...
Back
Top Bottom