Glen, I suspect that others besides myself aren't overly interested in downloading some app you posted, to try to figure out what you're talking about. Try to reconstruct your post to describe the question better. Just saying that 'it works for two records', and expecting people to download some...
You mention that this is a one-to-one relationship, but is it really? So one call record links to only one survey record and vice versa? Is there a reason you wouldn't use a unique record id in the tables then?
Max Hugen
Australia
Looks like you have a typo: "And bk.hr_leav_type ="
You can put a code break after you have your sql string assembled, and get the output in the Immediate window (?sqlstring), then copy this to a new query in SQL View, and check the query to errors.
Max Hugen
Australia
This is very rough and untested, but may help you:
UPDATE COA
SET AcctType =
IIF(AcctNum Between 1010 and 1149, "CASH",
IIF(AcctNum Between 1150 and 1299, "ACCTS RECEIVABLE",
IIF(AcctNum Between 1300 and 1539, "INVENTORY",
Null
)
)
)
Max Hugen
Australia
Hi Swi, no, I don't think this can be done in one query.
As far as getting other values from the transactional table, maybe you can incorporate these into the first 'grouping' query, and use additional DLookups to SET the other values in the master table. If not, you'll need to create...
Try this, it uses 2 queries (replace with your own table and field names):
Query: q_Update_MaxDate:
SELECT Max(Transaction.TransactionDate) AS MaxDate
FROM w_Transaction;
Query: q_Update:
UPDATE Master
SET Master.MasterDate = DLookUp("MaxDate","q_Update_MaxDate");
Max Hugen
Australia
In earlier versions of Access, I used the Windows Common Dialog dll (comdlg32.dll) to open the File Dialog. One of the settings I found very useful was the InitialDir property, so that the Dialog would open in a specified folder.
This does not appear to be available in the VBA FileDialog...
Unfortunately, .seriescollection.newseries fails in Access: error 438: Object doesn't support this property or method.
Just wondering... I'm using Access 2007, and have set a reference to the Microsoft Graph 12.0 Object Library. However, when I checked the refs in Excel 2007, I found that there...
Hi Skip, many thanks for your perseverance and patience. I had to crash at 2am last night.
Debug.Print TypeName(cht) ' --> Chart
Debug.Print cht.Application.Name ' --> Microsoft Graph
I'm also wondering if maybe I need to manually add data from the query to the DataSheet...
I've seen this in Excel VBA Help - but it's specific to Excel, as the required argument 'Source' must be a range object, which represents 'a cell, a row, a column, a selection of cells' [in a worksheet]. I don't see how that works in Access.
Max Hugen
Australia
I'm thinking that you may need to transform the data. Create a crosstab query, with the CategoryGroupID as the columns. Use a Left Join from your CategoryGroup table, to the data table, to ensure you always get all Categories (even if no data).
Using this query as the base, create a new query...
Yeh, I started in Access in '98... and some areas I just didn't bother with... eg charts. They had a terrible rep.
I am trying to add a new Series.
With cht
.SeriesCollection.Add
End With
I'm getting error 438: Object doesn't support this property or method.
Max Hugen
Australia
Thanks, I've seen that article - plus countless others - as I've floundered about on the web.
Yet the properties of the Chart object show that the OLE Class is Microsoft Graph Chart, and the class is MSGraph.Chart.8, so I don't understand how this is not MS Graph?
The major reason I'm delving...
An alternative to using VBA to control the Word merge from Access is to create the appropriate query in Access, then set up Word to use that query and Merge it via Word.
Max Hugen
Australia
Now I'm getting even more confused. Isn't the Chart object in A2007 the same as the Excel Chart? If not, how do I add an Excel Chart pls?
Max Hugen
Australia
Hmmm... some minor progress. Looks like I can dim a variable as type Chart in Access. I think it failed when I didn't append the ".object" property to the reference to the chart object at first, and then I didn't back-check after fixing it. My bad.
As to how to add a series (as I'd do in...
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.