I was quite familiar with DOS commands and was able to create access DBs and write the VBA button code. However that was quite a few years ago and Ive forgotten it all.For every image file in DIR A or subdirectory If that image file exists in DIR B, then delete the image in DIR B.
Does anyone have a source that lists basic Access (2000) commands. I have training in SQL server (so I am just starting out) but I am working with Access and the commands aren't always the same and the help files in Access aren't much help.
My immediate need is to find the equivelant of the go command. I am trying to build one query with multiple update statements.
I want to run multiple SQL commands on click of a button. I have these three command,
CurrentDb.Execute "INSERT INTO UserMadeDeviceT(Product, ORESector) " & _ " VALUES ('" & Me.D_NewDeviceTxt & "', '" & Me.D_ORECmb & "')" CurrentDb.Execute "INSERT INTO UserMadeDeviceT (RatedKilowattPower, KilogramWeight)" & _ " SELECT RatedKilowattPower, Weight FROM UserSelectedComponentT " & _ " WHERE [TotalComponent] = '" & D_ComponentNameCmb & "'" CurrentDb.Execute "INSERT INTO UserMadeDeviceT (Cost) SELECT SUM (EuroCost) FROM UserSelectedComponentT"
all of these work indevidually and return the correct value but the add three rows to the table. How can I combine these three commands into one so that it will only add one entry?
I need to send commands to an external device using a serial port.My understanding is that that I need to select the reference to the Microsoft Communications Control (MScomm32.ocx).But is not available in the list of references!
im designing a database for videoshop for loans in access. i have got my movies and loans tables (along with others) and have got them as a one to many (loans to movies) and have got Rental ID as Primary key in Loans table and got that linked to Rental ID# in movies table.
i want some sort of command in the loans form so that when a customer loans out a movie it will update the movies table (rented out field).
the fields that i have got in the loans table are:
Rental ID Customer ID# Movie Rented Out Date Rented Out Other Rental Details Rental Duration Daily Fine Rate
the fields in the movies table are:
Movie Title Movie Quantity Movie Description Genres Rating Director Popularity Rented Out In Stock Supplier ID# Rental ID# Stores ID#
if anyone whos reading this knows how i can do this then it will be highly appreciated if u replied to this thread.
I would like to issue a system command from within a VBA function. Specifically, I'd like to start another application using a command-line startup command, but am not sure how to do that.
Hi all, I was wondering if you could use custom menu bar commands to open reports and varying the recordsource of the reports according to which command you choose. For instance, if the user wants to view a report for January, he clicks on the January menu bar button. And I do not wish to use macros as there might be many macros to use.
Was looking at it and I am able to use my own vb functions but was wondering if I could use the tag field under the customise menu bar command to specify which records to filter to?
Maybe I should just use a form with all the code behind. lol... :p
I have created a query that has the info for a quick search. What I want to do is create a form that I type the last name of my customer and then click a button that opens the query and filters out all records that don't match the criteria I enter. I want the button on the form to do both. Is thie possible? If so how? Please Help. Very much appreciated
I have been working on customizing MS ACCESS to produce a report that involves one mathematical computation from my input data. However, I've run into a problem because I can't get the program to carry out a logic command that would work fine in MS Excel: the "IF" command. Specifically, what I'm doing involves a calculation, where one data input is subtracted from another data input, but if the difference is a negative number, I would like to substitute the value of ZERO. The closest I've come to achieving this is to enter the condition ">0" while in Query Design mode, but the problem with this approach is that if the difference is a negative number, the report does not display the data that resulted in the calculation of the negative number. In other words, I want the data to be included in the report, but I want a "Zero" to be substituted for all calculations that produce a negative number. For example, if I enter a set of data, and the two numbers that get subtracted are 40 minus 36, then the difference is positive 4, and so I want a "4" to be displayed; But if the two numbers to be subtracted are 36 minus 40, the result is negative, and so I'd want the report to display a "zero" in the calculation. Please advise me on how to set this up, as the only approach I've found resulted in all negative calculations being omitted from the report. Thanks for your help.
I have a custom menu bar that has a couple of menu lists, with a list of five custom commands that i want to run,depending on what is selected.I know you can assign a macro to each command,but is there a way to know which command has been selected. What i want to do is to have 1 macro that will run several functions depending on what was selected, rather than 1 macro for each button
1.Im wondering why there is no option to zoom in and out as we are working with relationships. 2.And even the option show all is not working; some of the tables in the relationship are kept hidden (screenshot is attached)! How could we work in this environment? 3.I do know the I can use the scroll bars, but they are not enough to perform the work more professionally
These features are available in most of the software!to zoom in/out To pan .To zoom all (extent Where are they in the relationship in Access?
I've been creating an automated way for users to import an existing DBF III file into an Access Table and then I'll be doing some other things after it's in. The user needs to be able to click a command button to open up a file picker, select the desired DBF and then click import and have it be imported into a new table.
Originally I had this all working because there was only one possible file name for the DBF file in each folder so instead of using a file picker I used a folder picker and supplied the file name in the VBA code as it was static.
However, I now need the user to be able to select a specific file and the name could be anything.
I've successfully edited the file picker to allow them to select a file however the importing is an issue. In order to do a TransferDatabase command I need the file path alone for DatabaseName and the file name alone for Source.
What would be the best way to split those two pieces of data up once the user has selected the file they need?
tell me that can we use functional keys F1, F2,F3,,,,,,,,,,,,,,F12 in ms access to perform commands like saving a form data , for closing form refreshing form, clear form.Or is there any way to make shortcut keys combination like[(ctrl+s)(ctrl+c) (ctrl+A)] in access to perform action like saving,closing,clearing, current form.
I was told to save the query and check the new table had the required records in it.
I had huge problems when I tried to save the query and kept getting error messages like: "query must have at least one destination field" and "syntax error in field destination". This was strange since I was sure I typed the query exactly as it had been written on the worksheet.
Having not changed the SQL command at all it eventually worked when I skipped the 'save query" stage and just went to the "run query" stage. I still don't know why it actually worked in the end and why I kept getting error messages.By running the query am I supposed to just click on "RUN" or can I check the information first by looking at datasheet view?
I have had my 4th SQL/APP Dev lab class, however I missed the 5th.
Our 5th lab was .
1. Create 3 tables, populate with given data and create relationships. 'Customer, Invoice, Payment'
2. We were given 8 queries to try do, we had to come up with which commands would be used.
I have no 1 completed.
As for no 2.. we are still learning all the commands, so the lab here is for us to find what commands we think will be used. I have researched and have them all 6 queries we have to run.., I have all those commands written out on paper which I think are answers..how to find the command line to test them.
Hi guys, im working on a project whereby a Visual Basic module has been designed in MS Access to email out a RTF document attachment of reports to shift managers when they have hazard items not closed in their area. Im building an ASP front-end to the database and would like to incorporate a button to do the mailout, however i dont know how i can link it to fire the code when the button is pressed. Is it even possible?
I am trying to automate the process of sending a query result via email.
I have code that will export a query as an excel document, using DoCmd.SendObject, but it has the name of the query.
DoCmd.SendObject acSendQuery, "Dailyrpt", acFormatXLSX, email.address, , , "Daily Report", "This is today's report", -1, False (email.address would actually be the email address it is being sent to.)
I also have code that will export the query to excel and save it as a file, using DoCmd.OutputTo, where I was able to name it something meaningful to the end user, and include the date.
DoCmd.OutputTo acOutputQuery, "Dailyrpt", acFormatXLSX, "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx" Dim Foldername As String Foldername = "Z:FolderComplete as of " & Format(Date, "yyyymmdd") & ".xlsx" Shell "C:Program Files (x86)Microsoft OfficeOffice14EXCEL.exe """ & Foldername & "", vbNormalFocus
Is there a way to either send the saved (renamed) file or to include the current date as part of the SendObject command?
So, my database appeared to be working OK yesterday however I occasionally saw an error in my "Update Event" script on one of my combo boxes. today, now when I try the combo box, I get a immediate crash.If im assuming its the same combo box, here is the code for that box:
Code:
Private Sub MCAcmb_AfterUpdate() Me.Model.RowSource = "SELECT DISTINCT [tbl].Record, [tbl].Model" & _ " FROM [tbl] WHERE Record = '" & Me.Recordcmb.Value & _ "' ORDER BY Model"
[code]...
I recently added a header...just tried it again and got the error:"The expression After Update you entered as the event property setting produced the following error:Object or class does not support the set of events."however I got it to work by entering VB, adding a space, removing it and then saving and entering the form view the form worked as normal. when i close and reload, i get the error again
I have just installed the windows version of Access 2010 on OSX Mountain Lion using a program called Crossover which works very similarly to WINE. I have found that Access will install fine except for VBA form modules and BAS modules, although there seems to be no indication that they did not install as the entire install progresses fine.
I've put together an invoicing program that was created in Access 2010 in Windows but have transferred it over to Access 2010 installed on OSX. It contains a number of forms with code but when I go to VBE, form code modules are not visible. When I try to view the code for a form I get the following error message: "Microsoft Access failed to create the Visual Basic module. If your database is on a network drive, check your network connection, then try again". I was able to insert a BAS module and create a rudimentary VBA subroutine which ran without error so it does seem able to interpret VBA as per normal.
Code: Private Sub Form_Timer() Dim LocalTime, StartWindow, EndWindow As Date LocalTime = Format(TimeValue(Now()), "hh:mm") StartWindow = #11:46:00 AM# EndWindow = #11:48:00 AM# Dim Response
[Code] ....
The intent is to run automated back end maintenance activities while giving the user the option to delay it if they're in the middle of something.
My logic is as follows:
If it's between these two times, ask the user if the maintenance can run. If user says yes, run maintenance. If user says no shift the two times to the right and ask again in a few minutes.
As it is written, when I chose no I get an hourglass icon and if I try to do anything else Windows tells me Access isn't responding. I'm guessing that Access is hanging since I've initiated the Do Until and then stalled it by telling it to wait 3 minutes before it goes to the next step. I suspect that if I waited it out, when the new Startwindow hit I would be asked about running the maintenance again.
My issue is that I need the database to remain responsive to whatever the user needs to do while I wait to ask about running maintenance again. Therefore, I don't think Do Until is my answer - at least not the way I've implemented it.
The will ultimately be set on a 10 minute timer interval and start/end window will be 01:00 and 01:15 AM respectively. The times you see above are there for testing so I can see what happens.
I managed to create a form that is able to search keywords on Access 2007. However, the keyword search must be exact to what is contained in the table.
For example, I stored "red blue yellow" into the database, and I can only search "red blue yellow", "red blue" or "blue yellow" in order to call that data.
How do I make it such that I am able to search "blue red yellow", "yellow blue red" or "red yellow blue"?
These are my current codes:
Code: Private Sub txtSearch_AfterUpdate() Dim strWhere As String Dim strWord As String Dim varKeywords As Variant Dim i As Integer Dim IngLen As Long