Search results

  1. J

    Problem when exporting table to excel spreadsheet

    I converted a macro to code. The macro had two queries ... the first one (Delete_tbl_Temp_Items), which deletes all entries in the tbl_Temp table. The second query appends the results of "CurrentTeachersSvcTag" to the tbl_Temp table. (I chose to delete the data and append the query results...
  2. J

    Still needing help with code for message box when no records found

    I figured it out, using an onload event on the form: Dim rs As dao.Recordset Set rs = Me.RecordsetClone If rs.RecordCount < 1 Then DoCmd.OpenForm "frm_RepairMenu", View:=acNormal, OpenArgs:="SearchRep" MsgBox "No records found" DoCmd.Close acForm, "frm_RepairInfo-Asset" Else txtDamageDesc =...
  3. J

    Still needing help with code for message box when no records found

    My stupidity is going to show here ... without quotes on which phrase?
  4. J

    Still needing help with code for message box when no records found

    I'm explaining it poorly. I'll try again. The form "frm_RepairInfo-Asset" is based on a query (RepairInfo-SearcyByAsset) that asks the user to enter an asset number. If it's never been sent in for repair, the query will have no results. If it HAS been sent in for repair, the results of this...
  5. J

    Still needing help with code for message box when no records found

    (P.S. At this point, Paul, I would trade ALL my networking knowledge for a tenth of your programming knowledge!)
  6. J

    Still needing help with code for message box when no records found

    I'm a little hesitant to post it. It contains student data (names, ID numbers, etc.), which we are sworn to protect with our lives. I don't want the black helicopters showing up at work! I can tell you the query that "counts" the number of records (RepairInfo-SearchByAsset2) shows correctly...
  7. J

    Still needing help with code for message box when no records found

    I tried that, then tested the form. I first entered an asset number I knew existed, but it never opened the repair info form ... it stayed on the repair menu/search form. After that, clicking "Search by Asset" just caused the form to blink. I know my novice workaround is clunky, and that...
  8. J

    Still needing help with code for message box when no records found

    I am not fluent in VBA, so coding is very difficult for me! I could not figure out how to use the DCount, so I tried using DLookup to pass the value in a query field, but it's not working. ---In this example, "frm_RepairInfo-Asset" is a from based on the query "RepairInfo-SearchByAsset". ---I...
  9. J

    Help with message box when no record found

    Mark ... It's not apparent, but the form is based on a query. Plog ... Thanks, I'll give that a try.
  10. J

    Help with message box when no record found

    I have a db where users can search for various things, which could be alpha, numeric, or alphanumeric. Right now, the code stands as such: DoCmd.Close acForm, "frm_RepairMenu" On Error GoTo fErr DoCmd.OpenForm "frm_RepairInfo-Notes" Exit Sub fErr: DoCmd.OpenForm "frm_RepairMenu"...
  11. J

    Problem with code to open a form based on value in checkbox

    sneuberg, I wasn't able to create a startup macro, but I put the code in onload and set that form as the default form when opening the database (I had to add a docmd.close to the frm_SetDefaults so that it didn't remain open), and it works! It may not be not sexy, but I get the desired results...
  12. J

    Problem with code to open a form based on value in checkbox

    Users don't login to the database, so there's no way (that I know of!) to capture their default name, and the location(s) they select can change according to what data they are trying to capture in their reports. I'll give your code a try ... and thanks for your help.
  13. J

    Problem with code to open a form based on value in checkbox

    I have a database that, when I send out a new frontend, the users have to enter their defaults (their name and location etc). They often forget to set these, even though I tell them to set them in the email announcing the new frontend. So ... I created a form (frm_SetDefaults) that has a...
  14. J

    IIf statement that formats text?

    I have a query that parses out apostrophe's in student names. In some instances, there is no student name. When that happens, the results are "#Error" for both FirstName and LastName. (Because I'm forcing the field to be included by way of joins). The formatting for that field works unless...
  15. J

    How do I get around the line limit in vba code?

    Pbaldy and Cronk, it's working now. Thanks for your help. Plog ... yes, it's definitely structured improperly. I knew when I posted my code that I was going to be called out on it (and rightfully so!). I created this database several years ago when I knew even less than I do now! Every time I...
  16. J

    How do I get around the line limit in vba code?

    As you can probably tell by my code, I'm not much of a programmer, so I'm not sure how to break it into multiple sections and concatenate.
  17. J

    How do I get around the line limit in vba code?

    I'm still getting a compile error ... strSQL = "INSERT INTO...
  18. J

    How do I get around the line limit in vba code?

    I get a compile error when I try to run the code.
  19. J

    How do I get around the line limit in vba code?

    Yes, I put the underline before the VALUES, and both lines of code turn red. Dim strSQL As String strSQL = "INSERT INTO...
  20. J

    How do I get around the line limit in vba code?

    The code that falls to the second line is red, and of course, that's where the code fails (that's what I mean by "it doesn't like it"). Even breaking the code with a " _" makes the subsequent lines red. Here is my code ... strSQL = "INSERT INTO...
Back
Top Bottom