Search results

  1. E

    Help With Code Syntax

    ChrisO - well done sir - it works perfectly now. Thank you Bob, SOS and Chris for all your help and patience!!
  2. E

    Help With Code Syntax

    Hi ChrisO and SOS - what would I set the db equal to? Thank you!
  3. E

    Help With Code Syntax

    Hi SOS - I fixed that - but still the same error. If I step through the code, it trips up before it gets to the sub . . it stops in the function . .
  4. E

    Help With Code Syntax

    No problem SOS! Option Compare Database Function ReturnCon(num As Integer) As String Select Case num Case 1 ReturnCon = "YesNo" Case 2 ReturnCon = "Byte" Case 3 ReturnCon = "Integer" Case 4 ReturnCon = "Long Integer" Case 5...
  5. E

    Help With Code Syntax

    Yes, I added the new declaration statment you posted. And I added my table name here, Select Case GetFieldType("YourTableNameHere", Me.cboFields)
  6. E

    Help With Code Syntax

    Hi SOS - thank you for jumping in. I still get an "object variable or with block variable not set." I can't figure out why? Set tdf = db.TableDefs(strTDF)
  7. E

    Help With Code Syntax

    Hi Bob - I am hoping you can still help me finish this. What do you think is causing the error mentioned in the previous post? What you posted is a great code and I would like to learn from it. Thank you!
  8. E

    Duplicates Based On Field . .

    I have included a workbook with an example. In the table, only records 1, 2 and 6 should remain. Thank you for any help.
  9. E

    Duplicates Based On Field . .

    Hello, I have a challenge I've been trying to resolve for a couple of days. I have one table with 27 columns. The data from that table is copied and pasted directly from Excel. I also have one form based on that table. Once I paste the data from Excel into the table, I created an extra column...
  10. E

    Syntax Error In Code . .

    SOS - Thank You for that lesson and solving the issue. Thanks . .
  11. E

    Syntax Error In Code . .

    Well, I've tried several option in my effort to learn, but I am just not getting it. The order by is causing my error. . . Private Sub cboFields_AfterUpdate() If IsNull(Me.cboFields) Then Me.FilterOn = False Else Me.Filter = "[Year] IN ('2008','2009') order by...
  12. E

    Syntax Error In Code . .

    Thanks you both very much!! If it would not be asking too much, since I am filtering for 2009 and 2010, how can I adjust the code so that the records show the 2009s and then the 2010s. Thank you again!
  13. E

    Syntax Error In Code . .

    Hi, this code is in a combobox. I can't seem to get it to function. I am siply trying to filter the form by the Field [YEAR] for only 2008 and 2009. The field type is TEXT and not date. Private Sub cboFields_BeforeUpdate(Cancel As Integer) Me.FilterOn = False If...
  14. E

    Error Handler . .

    Yup - I added the Goto :) Thank you for the help and for your website as well - I have used it multiple times!
  15. E

    Error Handler . .

    Hi pBaldy, If I understand correctly, I should place your code in the cmd module that opens the report. So what I did is I kept the NoData event code in the report, and placed this in the module that opens the report. Do you think this is efficient? ErrorHandler: Select Case Err...
  16. E

    Error Handler . .

    Hi pbadly, Thank you for your help. I have the code in the NoData Event of the report. Private Sub Report_NoData(Cancel As Integer) MsgBox "There are no records that match the " & _ "selected criteria." & vbLf & vbLf & _ "Please try again", vbInformation, "ABC" Cancel = True...
  17. E

    Error Handler . .

    Hi, I have a command button on a form that filters and opens a report. In the event that the report is empty, I have this, MsgBox "There are no records that match the " & _ "selected criteria." & vbLf & vbLf & _ "Please try again", vbInformation, "GSA" Cancel = True The...
  18. E

    Please Help With Syntax

    Thank You DCrake!! How can I improve the naming convention? Is it because of the " "? Thank you for your help!
  19. E

    Please Help With Syntax

    Hi, I am working on creating a listbox dependant on combobox. I followed an example but I can't get it to work. My listbox is call "ListBuilding" and the combobox is ListCode Private Sub ListCode_AfterUpdate() Dim strSource As String strSource = "SELECT Building_no " & _...
  20. E

    Help With Code Syntax

    Hi Bob, I get an "object Required" here, Set tdf = db.TableDefs(strTDF)
Back
Top Bottom