That module works great. I modified the example code to work where the primary key is a string. Would it be worth adding to the FAQ?
'SELECT FamID,
'Concatenate("SELECT FirstName FROM tblFamMem
'WHERE FamID = """ & [FamID] & """)") as FirstNames
'FROM tblFamily
Thanks again.
[MachineXREF] table contains a field for [State] and [Distributor].
I need to make a query to return the [Distributor] and all the states in a single field. For Example:
DistA: NC,PA,OH
DistB: NC,SC,WV
and so on.
How do I go about this?
SKIP,
I put what you typed as where clause (without the .....) and it give me "the expression is mistype or is too complex to evaluate" error. I am trying to save this as a query, not in VB.
I changed the where statement to:
IIf([forms]![frm_resub_report]![txtpromo]="",Like "*",[forms]![frm_resub_report]![txtpromo].[value])
and now it says "The expression is typed incorrectly or is too complex to evaluate". Do you have to have the LIKE outside of the iif, i dont see why it wouldnt...
I want the user to be able to type in < > or = and a number into a text box and use that expression in the where clause of a query. However, it seems that whenever there is an operator in the text box it doesn’t return any values. Is there any way to have a user select between < > or = and...
I am trying to import data to an existing table with a primary key of Machine_ID. The data file I am importing has a few repeat instances of Machine_ID so about one fifth of the records fail due to key violations. I want to record the most recent record (where Start_week is at it’s max). If I...
I have two forms that are viewed as a Datasheet to allow users to change data in the tables. I want to create a record in the history table each time a field in a record is changed. If a user changes five fields on the same record, I want there to be five different entries in the history...
I tried replacing the Shell line with:
Call Shell("EXCEL """ & strPath & """", vbMaximizedFocus)
It works on my machine and if it doesn't work on a 2K machine I will post again but I think that should fix it.
jebry,
the excel file is exported to the windows temp folder using the Environ("Temp"). I just discovered that it successfully exports the excel file so it must be erroring out when the Shell function tries to open it.
Brian
I have some VBA code that pushes a query out to Excel. It works fine on my machine with Windows XP and Access 2003 but not on my managers machine which has Windows 2000 and Access 2000 (don't ask me why the interns machine is brand new and the managers is 3+ years old). Here is the code I...
I have a query returns a single integer that I need to assignt put into a variable.
This doesn't work:
intCurrentUnits = [qry_sum_units_per_com]![SumOfComp_Units_Per_Component]
I have a list box that displays the query also, would it be possible to use CInt() to pull the value from there...
Here's the deal. I have a list box that I want users to be able to select (multi select = Extended) rows to export to excel, but before that can happen I think I have to populate a report to use as a template.
I have a Shipper table and each table is made up of one or more Components from...
I chose to use the DLookUp function because I want to ensure that a unique value has been entered as soon as the user types it in (in the AFterUpdate event). This is the code I use to lookup the value from the Shipper table for the Shipper_Material field.
strMaterial = txt_material.Text
If...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.