Search results

  1. T

    Solved Using a form to update a hyperlink in a table

    Hi All, I am having issues with making use of hyperlink object in an Update SQL. I have a form where a user pastes the URL to a drawing in a text box. I have a table, Drawings, with fields "ID" and "Links". The link will be transferred to the field in the table corresponding to the ID they...
  2. T

    Suggestions to improve form view

    I played around with it more and decided that a popup form with a click event on a small icon is good enough. It isn't exactly what I wanted, but it works.
  3. T

    Suggestions to improve form view

    Hi All, I am developing a form which draws information from tables putting them in neat rows. Each row has all the information necessary, ids, classification, hyperlinks to documentation etc. This is a database for connectivity in tubing ( T, Y, Cross, 90 bends, etc) However the last column is...
  4. T

    Inserting strings into variables - Syntax issue

    I went into more documentation on general string functions in VBA and finally got the result I wanted. Somewhere we got too focused on the database and end result of the string and it resulted in all this confusion. Simply put I wanted to put a variable, into a string, without the string...
  5. T

    Inserting strings into variables - Syntax issue

    I have a table with two fields. Serial codes, and a Number ranging from 1-100. Serial codes may appear multiple times with a different number. The goal is for a user to determine which serial codes are associated with all the numbers they selected. Combo box 1 has the number 4 Combo box 2 has...
  6. T

    Inserting strings into variables - Syntax issue

    Ok, let me see if I can clear things up again. A user will select 4 numbers in combo boxes. A button will initiate the code. Using the four numbers, (1,2,3,4) it will assign four variables, lets say var1,var2,var3,var4. These are assigned to a query under the same name as the number only...
  7. T

    Inserting strings into variables - Syntax issue

    Haha, I have always been poor at diction especially when it comes it learning a new language. So the long haul is the values selected in the combo boxes will return queries of the same name (prefixed with qry). This will form a SQL for a merged query comparing the queries in question. These...
  8. T

    Inserting strings into variables - Syntax issue

    I intended to use the combo box values for both SELECT and FROM. The long form of the code for just two combo boxes would be "SELECT qry1.number qry2.number FROM qry1 INNERJOIN qry2 ON qry1.number = qry2.number"
  9. T

    Inserting strings into variables - Syntax issue

    So reviewing the various advice, I used the basis of Gasman's code and advice from Doc man to create a SQL line. I don't quite understand how to use debug.print so I just assigned the string to a text box. Dim cmbo1 As String Dim cmbo2 As String Dim cmbo3 As String Dim cmbo4 As String Dim Sql...
  10. T

    Inserting strings into variables - Syntax issue

    The end result is to compare the 2-4 queries where certain values match. It would be simpler from a developer standpoint to make the combo boxes the queries themselves, but I am not the intended end user and wish to make it appear as uncluttered as possible on the form.
  11. T

    Inserting strings into variables - Syntax issue

    Hi everyone. Being relatively new to VBA, I have had issues correctly constructing a line of code to allow me to quickly select the correct queries in a form. I have four combo boxes that let you select values 1-100. I want these to transfer to a SELECT command (ex. qry1, qry2... qryN). These...
  12. T

    Returning specific rows from Many-many relationships

    That did the trick, thanks. Though I got to thinking that if I were to require sizes that weren't sequential, say small and large, or more than two sizes, this may run into issue. I always considered making two sub queries, one for each size and then a main query to compare the common...
  13. T

    Returning specific rows from Many-many relationships

    The issue with the OR statement is that it returns everything that has L or M, meaning a shirt that only has small and medium will appear in this case. I only want shirts that have both L and M to appear.
  14. T

    Returning specific rows from Many-many relationships

    SELECT tblShirts.Shirt, tblSizes.Sizes FROM tblSizes INNER JOIN (tblShirts INNER JOIN tblshirtsizeassociation ON tblShirts.ID = tblshirtsizeassociation.ShirtID) ON tblSizes.ID = tblshirtsizeassociation.SizeID GROUP BY tblShirts.Shirt, tblSizes.Sizes HAVING ((Count(tblShirts.Shirt)=2) AND...
  15. T

    Returning specific rows from Many-many relationships

    I uploaded a snippet of my database for reference. I was attempting to use WHERE (((tblSizes.Sizes)="m" And (tblSizes.Sizes)="l")); to see if it worked but I already knew from the start it wouldn't. I am somewhat new to VBA so if there are more useful arguments then I would like to know them...
  16. T

    Returning specific rows from Many-many relationships

    Hi All, I am having difficulties developing a query to return rows that include all of the requested criteria in a single field. Because of the nature of the data in my database I will make a short example to explain my situation. I have a clothing catalog with shirts. They come in sizes...
  17. T

    Count or DCount to obtain unique records in a subform field?

    Thanks to Micron and Majp. I went with something modified from Majp's code Dim getdistinct As String Dim rs As dao.Recordset Dim strSql As String strSql = "Select DISTINCT Component_Catalog_Number" _ & " FROM Components RIGHT JOIN ((tblSubctype RIGHT JOIN tblManufacturernum ON...
  18. T

    Count or DCount to obtain unique records in a subform field?

    This subform is referencing the query in the image attached. What I mean is I want to know how many assemblies make use of this material and not how many parts which is what a basic count tells me. If there are 5 parts in a single assembly that use polycarbonate, I only want that to be counted...
  19. T

    Count or DCount to obtain unique records in a subform field?

    Here is the form as it appears. The datasheet is the subform. The first field is catalog numbers for assemblies. As you can see searching for polycarbonate parts yields multiple parts from the same assembly. I would like B115877-I in this case to be counted only once.
  20. T

    Count or DCount to obtain unique records in a subform field?

    [SOLVED]Count or DCount to obtain unique records in a subform field? Hi All, I have created this form that lets me select a material of construction from a combo box - formMaterialsearch - which filters a subform - Materialsubsearch. This works perfectly fine. What i want to do is have a text...
Back
Top Bottom