Search results

  1. ErikSnoek

    GoToRecord

    Well the snippet I posted basically is some sort of GoToRecord thing.. I think I know what's up, the RS is set to a Recordsetclone _before_ you set the new Recordsource so it has already changed when you do the FindFirst on it. Try this: Set RS = Me.RecordsetClone RS.FindFirst "[Last...
  2. ErikSnoek

    Attaching a Previously Sent E-mail

    You didn't name the module "MailFindAndSend" right?
  3. ErikSnoek

    GoToRecord

    Weird. Maybe try using RS.FindFirst "[Last Name] LIKE '" & Me.txtSearchLast.value & "'" since thats what you do in your recordsource..
  4. ErikSnoek

    Addnew and Edit

    Change strCriteria = "[MonthAvailable]=" & Forms!filter("txtMonth" & intMonth) & _ " AND [ResourceID]" = Forms!filter("txtResourceID" & intRow) to strCriteria = "[MonthAvailable]=" & Forms!filter("txtMonth" & intMonth) & _ " AND [ResourceID]=" &...
  5. ErikSnoek

    Attaching a Previously Sent E-mail

    Did you place that line in some test sub? Like: Public Sub test() Call MailFindAndSend("The subject") End Sub orr..... are you trying to launch the sub from some other module? Or a form? In that case you have to add "Public" before "Sub", I forgot to do that ;)
  6. ErikSnoek

    Addnew and Edit

    Check my post, I edited it :)
  7. ErikSnoek

    Addnew and Edit

    Looks fine at a first glance. May I ask where you placed this code? edit: Ah! How could I miss this. strCriteria = "[MonthAvailable]=" & Forms!filter("txtMonth" & intMonth) & _ " AND [ResourceID]" = Forms!filter("txtResourceID" & intRow)
  8. ErikSnoek

    Attaching a Previously Sent E-mail

    You have to add a reference to "Microsoft Outlook 11.0 Object Library" (Extra->References)
  9. ErikSnoek

    GoToRecord

    Change DoCmd.GoToRecord , , "[Last Name] = '" & Me.txtSearchLast.Value & "'" To RS.FindFirst "[Last Name] = '" & Me.txtSearchLast.value & "'" If Not RS.NoMatch Then Me.Bookmark = RS.Bookmark End If
  10. ErikSnoek

    Question Access to MySQL

    MySQL has a tool called "MySQL Migration Toolkit", it does all the work for you (creates the tables in MySQL, transfers data from MS Access to MySQL etc.) :D
  11. ErikSnoek

    how to use the option button

    All the buttons in your optiongroup have a value (you can change the values in the properties of the buttons), usually 1, 2, 3 etc. In the After Update event of your optiongroup you can have a code like this: Private Sub Your_Option_Group_AfterUpdate() Select Case Your_Option_Group.Value...
  12. ErikSnoek

    Moving

    First thing I noticed is you have If vbYes Then which should be If iAnswer = vbYes Then
  13. ErikSnoek

    Attaching a Previously Sent E-mail

    Since you didn't specify any outlook folders in which to search in, the following code searches through all folders and mailboxes you have in your outlook :). Usage: Call MailFindAndSend("The subject") Sub MailFindAndSend(strSubject As String) Dim olApp As Outlook.Application Dim...
  14. ErikSnoek

    Displays warning before cmd_button execute

    If MsgBox("Yes or no?", vbYesNo, "Some title") = vbYes Then MsgBox "Clicked yes!" Else MsgBox "Clicked no!" End If or just If MsgBox("Yes or no?", vbYesNo, "Some title") = vbYes Then MsgBox "Clicked yes!" End If since you don't really have to handle the no...
  15. ErikSnoek

    Help finding info to put a box around a maximized form

    try: Private Sub Form_Resize() box.Left = 0 ' box.Top = 0 'just to make sure box.Width = Me.InsideWidth box.Height = Me.InsideHeight End Sub
  16. ErikSnoek

    First, Second, Third Question

    In that case you're gonna have to save the value in a table. Create a table with the field, link the table to the form and use the field in the table as Control Source for your textbox. The default value can be set in the properties of the field in the table. Hope you understood what I just...
  17. ErikSnoek

    visible = true or false

    Oh after reading your post again I realised the only difference is the one time your form is on Data Entry mode and the other time it isn't. So the following should suffice: If Me.DataEntry = True Then '(or False) SomeTextbox.Visible = False End If
  18. ErikSnoek

    visible = true or false

    Sure. Just add the Your_Control_Name.Visible = False (or True) code in the "On Open" or "On Load" event of the form and use the OpenArgs to specify what controls should be visible. For example.. One button has this code to open the form: DoCmd.OpenForm "your form name", , , , , , "a" and the...
  19. ErikSnoek

    First, Second, Third Question

    Aha! That is indeed the problem. Control Source should not be used this way, try setting the "Default Value" property :)
  20. ErikSnoek

    First, Second, Third Question

    Could you show me the code behind your button? I created your exact situation (I think) and it works for me. As a test I used: If Me.text33 = "1st" Then Me.text33 = "2nd" End If like you said in your post.. works for me.
Back
Top Bottom