Recent content by maxhavoc

  1. M

    Enter a subroutine on form initiation

    Is there anyway to have a subroutine be called when a form is brought up? meaning, as soon as the user opens the form, stuff happens without them doing anything besides opening the form.
  2. M

    Need help with string formatting

    Hmm, ok, that works, but I guess my example wasn't perfect. What if I need to do something like: strSQL = strSQL + '" & Serial.Value & "', " Or, is there such thing as a "+=" operator in VB? When I try your thing in the line above, it says expected expression, I guess because it's not being...
  3. M

    Need help with string formatting

    Hey everyone, I need some help with formatting a string for use with the DoCmd.RunSQL() method. I can't figure out how the hell VB deals with escape characters for the purpse of variables inside strings. I have this line right now. strSQL = "INSERT INTO OS (OS) VALUES(" + OS.Value + ")" This...
  4. M

    Question about Tab Controls

    Ahh! Thanks a bunch!
  5. M

    Question about Tab Controls

    In my program I have a tab control with three tabs in it, how can I tell which tab currently has focus (which tab is activated) in VB? I checked all the properties of the tabs, and there's no GetFocus or Value or anything like that, so how do I do it?
  6. M

    Creating SQL Queries from strings (VB)

    Nevermind, I figured it out CurrentDb.QueryDefs("qryTemp").SQL was the exact code that I needed, thanks a lot.
  7. M

    Creating SQL Queries from strings (VB)

    I don't entirely understand your function. I just need to set a query to a string, that's all. Can I use CurrentDb.QueryDefs("qryTemp").SQL to just set a string to the query?
  8. M

    Creating SQL Queries from strings (VB)

    That was my plan yes, why does that matter though?
  9. M

    Creating SQL Queries from strings (VB)

    Does anyone know how to create a query object using a string that contains SQL code? The reason I ask is that I want to be able to run an ad hoc query, but I can't use a RecordSet because there's no way (that I know of) to take the results of a recordset and create a query display out of it...
  10. M

    Creating queries from strings (VB)

    Does anyone know how to create a query object using a string that contains SQL code? The reason I ask is that I want to be able to run an ad hoc query, but I can't use a RecordSet because there's no way (that I know of) to take the results of a recordset and create a query display out of it...
  11. M

    String concatenation into a textbox

    This really is more of a VB than an Access question, but I need it answered, and I don't know a good VB forum so.... I have a text box that I'm trying to add text to, I have a loop, and every time through the loop it's supposed to concatenate new text into the text box by appending it to the...
  12. M

    Using RecordSets with variables (string issue)

    Oh thank you! Finally I get that damned thing working! As for your other comment, I check the input before doing anything with it, so that's not a concern, I'm not new to programming, just to VB so I know how to validate input, but thanks for the suggestion and the help.
  13. M

    Using RecordSets with variables (string issue)

    I'm trying to use a RecordSet to pull data out of an Access DB. I need to compare a field in the DB to a text box in my form. This is what I have so far. Dim Hardware As Database Dim Records As Recordset Dim strSQL As String Set Hardware = OpenDatabase("c:\hardware.mdb") Serial.SetFocus strSQL...
  14. M

    SELECT queries in VBA in Access

    I've been wracking my brain and scouring the net for information on how to do SELECT queries in Access and I can't figure it out or find correct information. Some idiot had a website that said to use DoCmd.RunSQL to do SELECT queries, but failed to mention that only ACTION queries can be used in...
Back
Top Bottom