This is a non-trivial topic, hence the dearth of replies. Bumping probably isn't a good idea; it gives the idea that an answer has been generated.
0) Create a form with a tree control (active x)
1) Create a module with this code:
Option Compare Database
Option Explicit
Sub AddSub(TheLine...
a few things to try
1) create a new, blank database.
2) press ^G to open a debug window. Select tools:References and make sure that Microsoft DAO 3.6 object libray is selected. If you don't have 3.6, select the nearest match
3) import all the objects from your current database into the new...
General purpose SQL script debugging technique:
Add a statement to your code
debug.print strSQL
copy the generated sql from the debug window (press ^G to open the debug window), create a new query, switch to SQL view, paste in the query, and work with it until it's correct.
If you have...
Sally,
Yes, creating a batch file that performs the transfer should do the work.
Again, I'm assuming you're not using the split database approach (which would be the preferred method) because of your requirements for this task.
When you make the batch file to run the update macro, you might...
A problem like this is generally d/t the queries; I seriously doubt the code has anything to do with it.
I would suggest you get the queries working correctly before trying to debug the report.
Normally, a problem like this is d/t a join that is causing Access to generate the duplicate...
You might want to learn about UNION queries. It's a way of combining two tables; you can open a recordset based on a union query.
Here's some sample SQL from a union query I used recently:
SELECT EmpName, EmpID, SS_Number, TermDate, Date, Points, EmpAutoNumID, AwardName, Step FROM...
The problem you are describing is why people usually use a FE (front end, with queries, forms, macros, reports, and code) database and a BE (back end, data only) database.
You can always ship a brand new FE database without upsetting your client's databases.
However, perhaps you have a...
After trying it out, forget the crosstab. You can't really make a sub-report based on a crosstab query to solve this problem; it wants to hard-wire the column names into the report; I was hoping to just show the products associated with each salesperson. Use Daniel's approach.
Some thoughts on the two methods:
There are some advantages to each approach (crosstab vs. VBA) in report generation:
Crosstab:
produces an easy to read table
doesn't require VBA
VBA:
can deal with any number of products (e.g. pivotted items)
often produces a more concise report.
Where to begin is probably a cross tab query, that can generate a view with product as the column headings, and a different customer on each row.
I'm thinking you'll want to make a subreport for the crosstab query, and add it to the group-by section for sales rep; but I could be wrong.
If you...
I apologize for leaving the quotes off the names (that will teach me to not at least paste it into a new module window first). Glad to hear you got it working!
Bill
I totally agree about reading the FAQ.
Regarding joining workgroups:
1) you can create desktop shortcuts to join a particular workgroup as part of invoking the database.
2) Depending on what your users do with Access (e.g. do they do their own hacking, do they use other Access Apps), it may...
All you should need to do is:
1) Create a module, and paste the entire AppendToFile subroutine into the module. Compile the code, then save the module as AppendToFileModule.
2) Create an event procedure for your command button. Here we'll assume the Command Button is named 'AppendDataButton'...
oftentimes, overflow errors are the result of trying to set a number that is too large for the datatype, e.g. setting an integer to a value > 32767 or < -32768.
Check your datatypes carefully.
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.