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.
You might try this:
' add this function to your form's code
Private Function IsValid(KeyCode As Integer) As Boolean
Select Case KeyCode
Case 8, 13, 27
IsValid = True
Case Else
IsValid = KeyCode >= Asc("0") And KeyCode <= Asc("9")
End Select...
To append to a file (or create a blank file):
Sub AppendToFile(SourceName As String, DestName As String)
Dim SourceHandle As Integer
SourceHandle = FreeFile
Open SourceName For Input As #SourceHandle
Dim DestHandle As Integer
DestHandle = FreeFile
Open DestName For...
Exactly correct; you have a references problem.
Open a module (or press ^G to get the debug window)
Select Tools-References
Enable the Microsoft Data Objects 3.6 Library
Please, no star for this, the question comes up at least twice a week.
I think using MySql is a great idea. Anything to get away from the Jet Engine. This link may give you more insight:
You might want to take a moment and look over the help.
Your query looks like this:
Update Orders set (Custom_Ingedients)=('test---Salami--') where Order_ID IN (SELECT...
When you use a secure access database:
1) your users have to join to the same workgroup (or identical workgroups [a practice I wouldn't recommend]).
2) users are prompted with a login screen that requires their username and asks for a password (if one is specified for that user).
The security...
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.