User Profile
Collapse
-
Wow thanks for all the great responses! I'll play with things a bit to figure out what will work best for our need. I really appreciate the help :-) -
Backup database via VBA
Is there a way to backup an Access database to another folder and rename the backup using VBA code? -
Thank you both so much for your help! I was able to implement jpatchak's suggestion (although I did need to close the form between saving and opening in Preview view in order for the strCriteria to take effect).
I will now work my way through the openargs suggestion as I need all the opportunities for learning Access I can get. Thank you again!Leave a comment:
-
Passing a value to a report via VBA
Is there a way to pass a value to a report via VBA so the value can then be displayed in the report as a concantenation with a string?
I have a report that displays all pricings that have occured in one day. I would like to display the pricing date in the report header. However, if there were no pricings for the date being viewed, I return no records so I can't pull the pricing date from my query results and thus want to set it programatically .... -
Actually, yup that should do it exactly. It's amazing how obvious the solution becomes when I stop trying to make VB follow my logic process and instead I try to follow VB's logic process! Thank you very much for helping me through that educational experience :-)Leave a comment:
-
My existing code works fine but since I reference that total $ amount (as determined by the SQL query) in both the procedure that sends the midday update email, as well as the procedure that sends the final end of day email, I had thought to simplify the overall code by only declaring and assigning the SQL query once (however, given the gaps in my education, thinking often gets me in trouble).
Basically, is there a way I can give a...Leave a comment:
-
lol sorry!
The DailyPricings table stores pricing information as it occurs throughout the day so the SQL query I included just summarizes whatever the total $ amount is for the current day at the time the SQL query is run (by summing price * quantity for records with the current day's date). So the $ amount may or may not change during the day, depending on whether or not any pricings occur. I just want to be able to assign that $...Leave a comment:
-
Reference a variable and its SQL-based value in two procedures
I am using Access 2003 and need some guidance on the correct way to reference a variable in two different procedures when the variable's value is based on a SQL query.
The database form has a button that, when clicked, will send an email, summarizing in the subject line the $ amount sold so far for the day. This email may be sent several times per day as needed, depending on the pricing volume. Then at the end of the day when all the... -
It was something like that. The forms in question were subforms and, using the master/child interaction, I figured out a more efficient way to accomplish what the code had originally accomplished. It was very much a matter of my understanding of Access having evolved. And believe me, the amount of code I added to other forms more than makes up for the few forms that were stripped of their code!Leave a comment:
-
-
Remove form from Project Explorer window
This seems to be rather a silly question but how do I remove a form from the VBA Project Explorer window? When I first setup the database, the form in question contained VBA code so it was included in the Project Explorer window. As the database has evolved (well, mostly as I have evolved), the coding changed such that the form is still in use but no longer has any code.
Since there are a number of forms, subforms, and reports, I would... -
-
Storing checkbox value without underlying table
I have an Access 2003 database with a form that is actually a mini-switchboard containing option buttons for various reports, etc. During about 1-2 months of the year, this mini-switchboard is used all the time. The rest of the year, it is not needed at all. I would like to add a checkbox to the mini-switchboard so users can select it to make the mini-switchboard load at startup (in addition to the main switchboard) so it could stay open all the... -
-
Including password in import code
I import tables from one Access 2003 database into another 1x/day (for various reasons, linking tables does not meet the need). The database I am importing from is password protected at the general level so I am asked for a password with each table I import. Is there a way to include the password in the import code? My VBA import code is as follows:
...Code:DoCmd.TransferDatabase acImport, "Microsoft Access", _ "c:\Pdb.mdb",
No activity results to display
Show More
Leave a comment: