Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. GabberGod

    Query selecting incorrect recordset

    ok so i was having a look at the faq section and i found faq703-3936 located at http://www.tek-tips.com/faqs.cfm?fid=3936 it says I hate writing the same code over and over like the code that loops through the items selected in a multi-select list box. This function will accept a list box...
  2. GabberGod

    Query selecting incorrect recordset

    the text box ony has 1 item, a programaticly generated string (format as outlined above), it is generated from a multi select listbox yes it is the record soruce of a report so what am i doing wrong?
  3. GabberGod

    Query selecting incorrect recordset

    SELECT Rep_Project_NOItemsB.Expr1000, Rep_Project_NOItemsB.Drawings.Status, Rep_Project_NOItemsB.Project, Rep_Project_NOItemsB.Partition, Rep_Project_NOItemsB.Section, Rep_Project_NOItemsB.[Sub Section], Rep_Project_NOItemsB.[Drawing No], Rep_Project_NOItemsB.Revision, Rep_Project_NOItemsB.Type...
  4. GabberGod

    constructing a string programaticly

    yep you are right so it ended up looking something like this Private Sub Combo5_LostFocus() Dim ctl As Control Dim varItem As Variant Dim Str As String Set ctl = Me.Combo5 Str = """" For Each varItem In ctl.ItemsSelected Str = Str & "'" & ctl.ItemData(varItem) & "', " Next varItem Str =...
  5. GabberGod

    constructing a string programaticly

    thanks alot guys i will give edski's code a go.
  6. GabberGod

    constructing a string programaticly

    yes thats what i meant so if i want after the entire thing is over myString to read "'xx1', 'xx2', 'xx3'" how would i do that note, its not going to read xx1 in real life that will be a parameter for a query i.e Select ... where [...] in myString or is null basicly i have the string, i...
  7. GabberGod

    constructing a string programaticly

    how does that work? wouldnt access just assume the myString = """" is my string = "should be text in here" "should be text in here" as " is the operator for literal text is it not?
  8. GabberGod

    constructing a string programaticly

    I need to programaticly construct the string: "'xx1', 'xx2', 'xx3'" what is the code for putting a ' in a string? and a "? unfortunately ive never done this and cant find it anywhere in the access help files, but thats not unusual.
  9. GabberGod

    query selects incorrect data

    and how do i programaticly construct "'xx1', 'xx2', 'xx3'" what is the code for putting a ' in a string? and a "? unfortunately ive never done this and cant find it anywhere in the access help files, but thats not unusual.
  10. GabberGod

    query selects incorrect data

    SELECT Rep_Project_NOItemsB.Expr1000, Rep_Project_NOItemsB.Drawings.Status, Rep_Project_NOItemsB.Project, Rep_Project_NOItemsB.Partition, Rep_Project_NOItemsB.Section, Rep_Project_NOItemsB.[Sub Section], Rep_Project_NOItemsB.[Drawing No], Rep_Project_NOItemsB.Revision, Rep_Project_NOItemsB.Type...
  11. GabberGod

    List box parameter is query

    I have a list box on a form. the reason i have used a list box instead of a combo box is that id like to be able to do multiple selections from the one control. Basicly fill in the fields on the form click the run report button and the report will open use the values from the fields (one of...
  12. GabberGod

    Run Time Error 3061

    I see, I will keep that in mind for the future, Thank YOU
  13. GabberGod

    Run Time Error 3061

    My hero Thanks PHV what was i doing wrong? p.s for the record you cant group by when selecting * ;) thats why i was having such trouble understanding my problem, how could no grouping be the error when its not possible to do so in this situation???
  14. GabberGod

    Run Time Error 3061

    Ok so i think i have the sql sorted out now. Private Sub Item_No_AfterUpdate() Dim db As DAO.Database Dim rs As DAO.Recordset Dim strsql As String strsql = "SELECT * FROM [Job Items]" _ & "HAVING [Project]= '" & [Forms]![NDrawing Entry]![Project] & "' AND [Partition]= '" & [Forms]![NDrawing...
  15. GabberGod

    Run Time Error 3061

    but it didnt work at all with the original brackets, said it was missing all 7 parameters required to run the query. This time it actually shows me the parameters in the error message and they are the correct parameters.
  16. GabberGod

    Run Time Error 3061

    is there somewhere i can read about the syntax of all this stuff. your help is great and greatly appreciated but its not really helping me understand all this any better. why single and double quotes? what is the effect? where do i use each?
  17. GabberGod

    Run Time Error 3061

    Private Sub Item_No_AfterUpdate() Dim db As DAO.Database Dim rs As DAO.Recordset Dim strsql As String strsql = "SELECT * HAVING Project= " & [Forms]![NDrawing Entry]![Project] & " AND Partition= " & [Forms]![NDrawing Entry]![Partition] & " AND Section= " & [Forms]![NDrawing Entry]![Sect] & "...
  18. GabberGod

    Run Time Error 3061

    im not selecting every field, or i would have use select *. Thanks so much for your help im booked in to do a course on this stuff in a few weeks, but i still need to get this done before then. ;)
  19. GabberGod

    Run Time Error 3061

    this is the vba code Private Sub Item_No_AfterUpdate() Dim db As DAO.Database Dim rs As DAO.Recordset Dim strsql As String Set strsql = "SELECT Project, Partition, Section, Sub Section, Drawing No, Max(Revision) AS Rev, Type, Job, Item No, Item Name, Quantity, Supplier, Status, Due Date...
  20. GabberGod

    Run Time Error 3061

    the form is open, im calling the vba from a subform of the form in quetion, the form is open and the required data is in the fields. if i go to the queries window and double click the query in question i recieve the results in looking for. also if i use vba to open the query, that works too...

Part and Inventory Search

Back
Top