User Profile
Collapse
-
Thank you. That is what I did. I had to rewrite the VBA to run a macro that ran two qry's. One to delete the information and the other to append the new stuff.... -
When you open Access you can run a report to do that.
Create a Macro called Autoexec and inside it run a report (rptContractsEx pire)
The report will be linked to a query (qryContractsEx pire) that tests the date against the date of the contract +90 days or what ever your criteria is. So [ContractDate] field criteria should be >=Date()+30 provided your date is in date format and not text format. Othewise you need to be creative....Leave a comment:
-
Importing a new table to replace one with a relationship
I have a database that has a form added for the users to import updates from another database without me having to do it manually. It looks for a DBASE IV file that is placed in a shared directory on a server and imports it into the Access DB. I have a relationship set on this table in the Access DB and when I try to import this update I am told that I can not because of the relationship.
Is there a way to do this? It is important... -
Reference Fields within the same Record
I have a table with information about an individual and their supervisory chain and what job title the employee is.
If done correctly the top of the supervisory chain will be entered in first and then the employees which they supervise after that. When I print out the form I list the employee and their information as well as the supervisor information. How can I list the supervisor position on the report as well without breaking... -
First you need to make sure that your date field matches up with the function.
Date() returns mm/dd/yyyy
Then you want to try dteField >date() or isnull(dteField )
That will produce all records that are greater than today and that are blank.
If your date dosn't match up to the format you need to be creative with some code to manipulate the date to match up like:
SometxtField=ri ght$(date$,4)+l eft$(date$,2)+m id$(date$,4,2)...Leave a comment:
-
Re-using sql Code for access qry
I have a form that prints a report based off of a query for a specific table. If I want to use this form for other tables that have similar data but for certain reasons must be kept seperate tables how would I improve on what I am currently doing?
Currently I have a select case statement placed in the Private Sub Report_Open for the report in question that sets the report.recordso urce property to an SQL statement version from a query.... -
Do you have a field in your table that has the exact run time of each movie? If you do then in your qry put Runtime="420" or Runtime="7hrs" depending on how your field is formatted or weather you put the minutes or hours in the field data.Leave a comment:
-
I used this snip of code for a similar problem I was having.
On the event for before your subform should populate the data, call this public sub.
Make sure you change my form name to your object name.
Public Sub RequeryList()
'This was copied from the HELP section of MS Access
'It makes the list box refresh the information based on the
'selection made in the combo box
Dim ctlCombo...Leave a comment:
-
Why is there an underscore after the THEN in your code example? Also, what are your field types? If they are Number and not Text it will not work.
--BeattieLeave a comment:
-
The only way I know you can do it is to have the "front end" written in a program like VB, and then compiled to .exe
You would then include the DB file with the program and you would also need to write another program to install the files in the appropriate directory.Leave a comment:
-
Without using VBA here is what you can do:
If you want a query to look in two fields you need to drop down one line on the criteria. For example, in your query you put in the circuit_ID_OLD. In the criteria you put like [Enter ID for OLD] Then move to the next column and put in circuit_ID_NEW field. One line below the criteria you used for the OLD id but in the column for the new ID put like [Enter ID for NEW]
When you run...Leave a comment:
-
so in your table you have a field called GROSS and a field called TAX correct?
If that is the case, on the properties for the TAX field in the gotfocus area put the following in the code for the form:
Private Sub tax_GotFocus()
tax.Value = Gross.Value * 0.02
End Sub
If you make the properties for the tax field locked (again in the field properties for TAX and change the setting for LOCKED...Leave a comment:
-
Qqueries in VBA
I have a form and when you click a specific label another form opens. This second form has a drop down box that you can select items from. Based off the selection a list box is populated with information from a query (that gets its data from the drop box and using requery) that has three fields. When I select an item from this list box I want to pass ALL of that information to the first form in a text or memo box. I am only able to pass one of... -
To all that contemplated this post:
I thank you for your thoughts and to comteck for your assistance. My problem did not exist with my unbound text box source controls. The problem was my loading and unloading of forms. I have two forms, both tied to tables. One form opens up first and when the user clicks a button to exit the other pops up. My code was not loading the second form correctly (the form that I was pulling the data...Leave a comment:
-
Comteck,
I triple checked my expression in the controlsource. It reads exactly as this:
=Forms!frmInput Form![PERSON SSN]
No space in front of the equal sign. I even used the expression builder to make sure I didn't mistype anything.
When I start a new report and just put one unbound box in and use this control source everything works until I close access and then open the file again. That is...Leave a comment:
-
Reports with unbound fields #Name? error
I have a report that I create using unbound text boxes to link to an open form. When you click on a cmdbutton on the form the report is supposed to print out information from the form.
It works fine until I close the database and restart it. That is when I receive the #Name? error. Nothing that I have tried works to resolve the issue. My text box names do not include references to the information I am requesting in the control...
No activity results to display
Show More
Leave a comment: