Search results

  1. S

    Allow User to change default checkbox values

    Ok, I've got a form (frmEdit) that allows users to search tblMain for records using a bunch of unbound controls and a dynamically created SQL statement. Search results are displayed in a subform (subMain), and the current record in the subform is displayed in a set of bound controls on frmEdit...
  2. S

    Split Form Behaviour using a form and subform

    Never stupid. Sometimes (read: often) it's the small things that getcha :P Default view of the subform is Datasheet. Posting the db would require a pretty extensive amount of redaction... I'd rather not do that. But if it comes to it, I suppose... EDIT: I'm trying to refine everything a bit...
  3. S

    Split Form Behaviour using a form and subform

    A few months ago I posted a question about how to get a form and subform to behave like a split form (because split forms suck). I'm very close, but am stumbling at the finish line. I've got an Access 2007 db with a form (frmEdit), on which there is a subform (subMain), whose record source is...
  4. S

    Split Form Behaviours with Subform

    WOAH! So I took a bit of a hiatus on this, finding a workable alternative involving a textbox whose input would allow the user to navigate directly to whatever record they wanted. But I've made some progress! Turns out my big problem was that the original datatable (which, in my defense, I...
  5. S

    New to Error Handling. Any Advice?

    COOL! Any advice re: resources for nested error handling? I've hit a hurdle on that now, too... :S
  6. S

    New to Error Handling. Any Advice?

    Thanks! So do I need to tell the code to ignore the previous GoTo statement in order for it to recognize the next one? (The link you provided was broken)
  7. S

    New to Error Handling. Any Advice?

    Hey all. Just wrapping up my first access programming project and am integrating some error handling code. Never worked with it before. Found this and this very helpful in getting me started. Question: I'm trying to sort out how to put multiple error handlers in one procedure. For example, I...
  8. S

    QueryDef.SQL vs. QueryDef.Parameters

    WOW. It works, too!
  9. S

    QueryDef.SQL vs. QueryDef.Parameters

    Excellent! Now we're getting somewhere! Now I just need to sort out how to make all that magic happen! I'll get to work on it and report back if/when I encounter further issues. Correct. But it's already doing that. Since the SQL is built inside the Click event and the controls are checked...
  10. S

    QueryDef.SQL vs. QueryDef.Parameters

    So are you suggesting I should: Create an empty table, Create a QueryDef, Use that QueryDef to populate the table, and Delete the created QueryDef object and clear the populated table every time btnRunQuery is clicked?
  11. S

    QueryDef.SQL vs. QueryDef.Parameters

    I was creating a nameless QueryDef because the MS help file indicates that that is the way to create a temporary QueryDef object, which I was under the impression I would want to use, since I don't want my database to grow and grow and grow as more and more QueryDef objects are saved to disk...
  12. S

    QueryDef.SQL vs. QueryDef.Parameters

    Hmm. I only ask because Private Sub btnRunQuery_Click() Dim mySQL As String Dim strSel As String Dim strWhere As String Dim qdf As DAO.QueryDef 'Build SELECT Statement (strSel) based on user input (checkboxes) 'Build WHERE clause (strWhere) based on user...
  13. S

    Run Query Based on Dynamically Constructed SQL

    Or maybe this is what I need to be looking at... a whole other can of worms that one is... hopefully I can find something simpler.
  14. S

    QueryDef.SQL vs. QueryDef.Parameters

    Since mySQL will always be a SELECT query, won't I run into problems with the .Execute event, since SELECT queries can't be executed?
  15. S

    Run Query Based on Dynamically Constructed SQL

    Hmm... so enticingly simple. But it's spitting back run-time error 2342: "A RunSQL action requires an argument consisting of an SQL statement." Odd, considering that my DoCmd.RunSQL line simply reads: DoCmd.RunSQL mySQL and mySQL is most certainly an SQL statement; an example value for mySQL...
  16. S

    QueryDef.SQL vs. QueryDef.Parameters

    Thanks very much, I'll see if I can get it to co-operate with those resources you've given me. On somewhat of a tangent, are you able to explain to me the difference between a QueryDef Object and a DAO.QueryDef Object? I honestly just do not understand the whole "references" thing, and the more...
  17. S

    Run Query Based on Dynamically Constructed SQL

    I've got a form (frmEdit) that allows users to (1) search tblMain, (2) view those results in a subform, and (3) view the current record in a set of bound controls. I want to add code for a button to run a query (in table view) based on the user's search. Since every search will be a little bit...
  18. S

    QueryDef.SQL vs. QueryDef.Parameters

    No, I think I've got a pretty good hold on that. When I click the button (with my mouse) I want the btnRunQuery_Click event to do what it currently does (i.e.: dynamically build the mySQL variable), but then to also take that SQL and run/create a query based on it. My suspicion is that I'll...
  19. S

    QueryDef.SQL vs. QueryDef.Parameters

    I'm already dynamically building the SQL successfully. The SQL above was the result of that; I popped some criteria into my various controls and ran the btnRunQuery_Click procedure. All is working as it should. What I want to do now is add code to the btnRunQuery_Click procedure that will run a...
  20. S

    QueryDef.SQL vs. QueryDef.Parameters

    Guess I missed the last ")" when I copied and pasted; it prints fine to the immediate window. It reads as it now does above.
Back
Top Bottom