Search results

  1. L

    Retrieve SQL Results

    Mark, If you're referring to 'fnAnySQL() parameter query'. I did, but it's too complicated for me. I'm looking for a simpler solution.
  2. L

    Retrieve SQL Results

    Ok, I tried the solution mentioned in the article. Did I interpret it correctly ? See below for error and code. strCompany = strQuote & [strCompany] & strQuote DoCmd.RunSQL "Insert Into [Sales Tax Table] ([Company Name], Grocery_Amount, Amount, Grocery_Date, Category) Values ('" &...
  3. L

    Retrieve SQL Results

    Doc_Man/Mark, I'm back . . . I see the problem. It's the single quote in [Company Name] or [strCompany] (i.e Xyz's) for the DoCmd.RunSQL statement (as shown below). DoCmd.RunSQL "Insert Into [Sales Tax Table] ([Company Name], Grocery_Amount, Amount, Grocery_Date, Category) Values ('" &...
  4. L

    Retrieve SQL Results

    Doc_Man, The value Xyx's is an example of the value in the field [Company Name] in the [Category Table] table. DLookup Statement Me.Category_Name = DLookup("[Category]", "[Category Table]", "[Company Name] = [Name_Choose] ")
  5. L

    Retrieve SQL Results

    Doc_Man, I'm getting the below error . . . Run-time error '3075' Syntax error (missing operator) in query expression For the value of Xyx's
  6. L

    Retrieve SQL Results

    Thanks to everyone ! ! ! I ended up using the following 'DLookup' statement. Me.Category_Name = DLookup("[Category]", "[Category Table]", "[Company Name] = [Name_Choose] ") I did run into a problem with values with single quotes in [Company Name] (i.e. Lowe's, Catherine's, Sonic's .etc.)...
  7. L

    Retrieve SQL Results

    Mark, The msgbox displays the correct SQl code, but how can I retrieve the results. Dim strSQL As String Dim rs As DAO.Recordset MsgBox Me.Name_Choose & " <==> " & Me.Category_Name strSQL = "SELECT [Category] FROM [Sales Tax Table] WHERE [Company Name] = '" & Me.Name_Choose & "'" MsgBox strSQL...
  8. L

    Retrieve SQL Results

    OK, I tried the 'Dlookup' command, but I'm getting a syntax error. Dlookup("[Category]","[Sales Tax Table]","[Company Name]= '" & Me.Name_Choose & "'") What's wrong ?
  9. L

    Retrieve SQL Results

    I'm trying to retrieve the value in the 'Category' field of the 'Sales Tax Table' table with a VBA SQL statement. The SQL statement matches the 'Name_Choose' (textbox) with the value in the field 'Company Name' in the 'Sales Tax Table' table. I need to place this value in 'Category_Name'...
  10. L

    Retrieve SQL Results

    No, [Sales Tax Table] is a table.
  11. L

    Retrieve SQL Results

    Run=time error '3061' Too few parameters, Expected 1.
  12. L

    Retrieve SQL Results

    theDBguy, Did I miss something ? This did not work. Dim strSQL As String Dim rs As DAO.Recordset strSQL = "SELECT [Sales Tax Table].[Category_Name] FROM [Sales Tax Table] WHERE [Company Name] = '" & Me.Name_Choose & "'" Set rs = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
  13. L

    Retrieve SQL Results

    How can I retrieve the results of the below SQL statement in VBA ? Dim strSQL As String strSQL = "SELECT [Sales Tax Table].[Category_Name] FROM [Sales Tax Table] WHERE [Company Name] = '" & Me.Name_Choose & "'"
  14. L

    Sharing Tables With Two (2) Different Databases

    Ridders, Great, that what I need. How can I achieve this ? Are there any examples ? What code is needed ?
  15. L

    Sharing Tables With Two (2) Different Databases

    Is it possible to share tables with two (2) different databases ? To clarify . . . I have a database that collects data into tables (via form) that are needed to produce reports by a different database.
  16. L

    Conditional Formatting (AfterUpdate)

    Wayne/Arnelgp, It works . . . Thanks to the both of you ! ! !
  17. L

    Conditional Formatting (AfterUpdate)

    Arnelgp, Got it . . . Thanks ! ! !
  18. L

    Conditional Formatting (AfterUpdate)

    Arnelgp, You still uploaded the wrong database . . . Nothing changed.
  19. L

    Conditional Formatting (AfterUpdate)

    Arnelgp, You're right . . . I fixed this by adding Me.Bill_Due_Date.ForeColor = 0 in BeforeUpdate. Also, did you load the wrong version for your solution ? The textbox does not change the color to red.
  20. L

    Conditional Formatting (AfterUpdate)

    Arnelgp, Wayne solution worked. Did I miss something, what were you referring to ?
Back
Top Bottom