I have a form which with the push of a button opens a select query. After I have the select query open, is there a way to make a new table with these records directly from the form. I know I can do this by using a "Make Table" query, but I need to make a new table each time, but Access only lets you overwrite the table. Is there anyway you can rename the table each time you run the query in the form itself?
is it possible, for any reason, to append another sql query after one sql query? for example, the first one is "select name from bla bla where name=something" and we just add another query at the end of the query to make something like "select name from bla bla where name=something and then show table from this database"
I've done some searching, and haven't found any threads that match what I am attempting...
I have a database that tracks expenses that are incurred under different ongoing projects. I currently have a report based on a query that asks the user for the project number, and shows all the expense invoices that have not been paid for that project. This report is basically an internal invoice that gets assigned to a department, and so it is assigned an internal "invoice" number. Currently, the user types in this internal number before the report is generated and it is displayed on the report for printing purposes.
Here's the tricky part (for me anyways): I would like to be able to filter the invoice records by project number, and then append the user-entered internal invoice number to the applicable records. There is already a field in the table for this data, and it is currently being entered on individual records after the report is printed. My goal is to be able to do this all in one step.
Any help will be greatly appreciated... Thanks guys!
I am having a problem with my append query on my student form.When I add in the details on the form and run the append query it throws back a dialogue box saying Enter parameter value...
hi Guys, I have been looking at different post and checking Microsoft help files as well, but still can't seem to fix this problem.
I am having 2 tables. The first table is connected to a form for viewing and entering data, and in the second table i am just copying 3-4 fields from the first table.
I am trying to use the insert statement to insert records in the second table, and everytime i click on the "Add" button to add the records i get the following error "MS access can't append all the records in the append query ... blah blah blah"
However if i close the form and reopen it, and goto the record (as it is saved in the first database) and now click on the add button to add the fields to the second table/database, it works.
I have a subform containing a list of Funds and attributes such as Asset Type, Fund Manager, etc.
Currently, I have a textbox, where the the control source is set so that it will be updated with the Asset Type from the subform.
I also have an unbound combo box that contains a list of Asset Types queried from a table via row source, where user can select the Asset Type.
What I would like is when a record is selected from the subform, the Asset Type is selected on the combo box as a default value. User can select another Asset Type if required. How can I do this?
I've got a code that allows me to select one or many names from a listbox on a form and return data relevant to the name(s) selected from a query. The following code is triggered by a button on the form...
Private Sub Toggle4_Click() 'Set it all up for CSM selection Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim varItem As Variant Dim strCriteria As String Dim strSQL As String
[code]....
(Toggle 10 goes to the code for the second listbox which has the same code with different tables refered to giving two selections in the query.)
What I want to do is replace the "warning if nothing found" with a code to show data against all the names in the list box if nothing is selected in the listbox.
I have a list box bound to a query. If the list box retrieves two records, I am not able to select only one of them. If I click, it gets both records selected ( highlighted ). Is there any way I can select only one record?
is it possible to use a sum select query in the control source field of a text box. I have a query that works fine in a combo text box but I keep getting a 'syntax error with subquery parenthesis' when I try and build on in a normal text box.
I am building the query using query design view and the query works and then I'm copying the SQL code behind the query into the text box field and access reformats it s a bit so not sure it's that's the reason.
R_P_Data_P = Table approvalNosys = Field in the table status = Field in the table score = Field in the table cmrOverview = Form [approvalNoSys] = field in form 1 is the criteria
Code: SELECT R_P_Data_P.approvalNosys, R_P_Data_P.status, Sum(R_P_Data_P.score) AS SumOfscore FROM R_P_Data_P GROUP BY R_P_Data_P.approvalNosys, R_P_Data_P.status HAVING (((R_P_Data_P.approvalNosys)=[forms]![cmrOverview]![approvalNoSys]) AND ((R_P_Data_P.status)="1"));
I'm looking to select name of a hospital from "HospName" from a list box. If no, then at least to write the name and the rest I'll get it associated with the name.
Then I need to know if I can put this in a form so the form asks same criteria?
I'm fairly new to Access. 's various select queries containing useful and useless results. I want to create a select query that will pick out all the useful figures into a 1 row table that can then be pasted into Excel.
e.g Existing Select Query 1 returns 1 row showing Average Age, Average Price, Total rainfall Existing Select Query 2 returns 1 row showing Average Weight, Average Salary, Total snowfall Existing Select Query 3 returns *2* rows: It returns Distance from London, Hours daylight and population for Town A and Town B
I want a select query that returns 1 row showing (6 items):
Total rainfall, Total snowfall, Town A Distance from London, Town A Population, Town B Distance from London, Town B Population.
I've been able to handle getting Total rainfall and Total snowfall. But I cant figure out how to get Town A Distance from London, Town A Population, Town B Distance from London, Town B Population to appear in the same row of the same query results as Total rainfall, Total snowfall.
In some cases I create pass-through queries and use these in an Append or Make-table query to bring data locally.
All is well and fine until source data changes and the pass-through query runs too long and times out.
If needed, I can extend the timeout value in the Parameters of the pass-through query no problem, but when I try to open the Append or Make-table query in Design view to do the same, the pass-through query is first triggered and then throws the timeout, and I cannot access the Design view of the Append or Make-table
Is there a way to open an Append or Make-table query in Design view without invoking the source query?
Relating to a combo box that shows value from a table (not the table that is the datasource for the form), is it possible to have it append its source table if a value is typed in that doesn't already exist?
Be even better if it that could be done in conjunction with a Yes/No Message box...
I've been reading through the Key errors but how they apply to my application. I am appending records into a table from a main form and a sub form. I can append twice and then I get the key error.
Can't append all records in the append query. Type conversion, Key violations for 2 records. I don't understand why the subform lists the first 2 with no problem but if there are more than 2 it throws the error.I have checked the possible reasons but there are no violations.
I have a form(frmNewTest) that generates a fitness test id when you enter the month and year (you do not need to enter anything in the Fitness test id field which is greyed out).
This data on the form should then append to the tblFitnessTest. However, when I select the button to add test it returns a message 0 rows to append.I have attached the database and the form in question (frmNewTest). There are two append queries attached to the button on the form and neither work correctly. I have tried almost everything but can't get it to work.
I have an append query that takes an item (once selected) from a listbox and it appends the contact name to a new table. Is there a way I can make an append query thay takes the ContactID and the ContactName and append it.
The listbox box has column 2 Bound (ContactName) soeven though I have written the query to take the ContactID it still only takes whats in the bound column!
I want to 'append' individual records from 2 tables and place in an archive table or within another database, whichever is the best option. I then want to be able to 'delete' the relevant records from one table.
The tables are tproperty and trents. This property paid rents but has since been sold. Therefore it no longer belongs in the database, however client wishes to keep details of the property/person/and rents paid in past, for any future ref. These tables are linked in relationships to tlessee and tbilling. I've read books/notes/looked on here for inspiration and the right direction! If I choose 'append' which seems pretty straight forward then a 'delete' query, how do I choose only one record? Is a make-table onto a different database a better option? It would appear that the whole table is copied over? Can't understand the issue about auto-numbers being copied over? Do I have to use an append/delete query for each individual property that's ever removed? I'm at a loss! :) Thanks
I have a database that contain foreclosure records. I'd like to create a query that will ask for a date and all records that are LESS than the date will be moved to a different table.
I'd also created an icon on my form and I'd like to attach this query to it.
Please how can i use a procedure to create a query, then append the content of the query to a table (am using MS Access Project)? i did it in Microsoft acess database but now i need it on Microsoft access Project beacuase am transfering to SQL server. Thanks
Now i want to create an append query that will add in table ZALGA fealds PROIZ_I, TIP_I, DN_I, KOS_A, KOS_I by critera if TIP_A = TIP_I AND DN_A = DN_I then calculate KOS_Z = KOS_I - KOS_A?
I am building a database to hold information of training courses and staff that have requested or completed the training course.
I have built a form which the team leaders can use to request training for their team, basically when the form opens up it asks for team name and training session and then appends the names and training session ID to the main table. This then allows the team leader to tick the "request training" tick box which updates the table for each member they request trainig for. They would then send this using a custom command button which is linked through outlook.
The problem I am encountering is that if they were to selct the same team and training session again it would then append the same data to the table and this would create duplicate entries.
How can I set it up so it appends only once and then any other time the same data is selected by team leaders it would populate the form with the existing date rather than appending the same data.
Dear all, I have a trouble to run the append query. It is failed due to the key violations. Could you please help me how to solve this problem? Many thanks. Bich
Any assistance someone can give me with this append querry issue is appreciated.
I have a table called tblRoleAssignments that has three fields RoleAssignmentID (PK), RoleprofileID & ApplicationrightID. It looks something like this.
my append query will write new records depending on the RoleprofileID's I entered, for example If I run my append query on the above list I get the following output
My problem is when I run my append query I want it to enter a specific value in the role profile ID column (taken ideally from a field on a form that will be loaded) so instead of the query entering a zero it writes to the table a vaule I want. Below is how I want my append querry to write the data if I wanted the RoleprofileID to be set to 35.
I think i need to use an append query for this but have never used on before so just need to know if it is the right thing to do.
I have two tables [tblPoles] and [tblPoleInstructions].
I have a form set up for [tblPoles] so the user can enter the data required. One piece of data required is a start date. The only fields the tables have in common are the PK which is the Pole Number and the start date.
I want the user to be able to enter the start date on the form for tblPoles and it to be automatcially entered into tblPoleInstructions. Is an append query the right way to do this?