Queries :: Don't Include Certain Records At Press Of A Button
May 7, 2015
if its possible to have a button that after clicking it, it doesn't show certain records. Reason being I have a "shows" for each month on our personal site and amazon, and we've been selling on those for about 2 years, and I have a "show" for each month. But, that quickly clutters up the list box. Any way to create a button the (after typing in the name) it doesnt show only those record(s)?
View Replies
ADVERTISEMENT
Aug 2, 2013
I have a query run that gives me a list of records that I view on a continuos form. What I want is to press a button and run a macro/Append Query to add a Single Summary record to another table.
For example my query spits out this data
Part # Quantity Serial Number
GO2 1 123
GO2 2 456
GO2 2 789
What I'm looking to get is
Part Number Total Quantity Serial Number 1 Serial Number 2 ..
GO2 5 123 456
I'm stuck on a couple of things.
1. Getting a new single row to append.
2. Getting Serial Numbers from several records to save on to a single record.
View 4 Replies
View Related
Aug 27, 2006
How do I make a botton on a form open a report when pressed?
thanks
View 10 Replies
View Related
Jul 10, 2014
I am setting up a database to hold staff details, and would like a query to show each member of staff's total hours and FTE.
Staff name etc is in tblStaff
Staff shift details are in tblShifts linked via staffID
tblShifts will contain details of the shift worked on each day of the week, but the majority of our staff work a standard shift - e.g 8-4, 9-5. Therefore what I wanted to do was in tblStaff set a field named shiftPattern to 1 2 3 or 4. 1 indicating a custom shift, and any other number indicating a set shift defined in a separate table.
The problem I have is that my query only returns people who have details in tblShifts - regardless of their shiftPattern value. If I enter a blank record in tblShifts it will do the above as intended.
View 7 Replies
View Related
May 29, 2005
Hi,
I need help with listbox problem:
I made a listbox contains peoples name from A to Z.
I want to sort it via A to Z button press.
It's similar with customer phone list form in Northwind.mdb sample,
due to my limited knowledge, I can't replicate it using listbox.
Any sample to do this?
Thankyou.
Gunawan.
View 7 Replies
View Related
Jul 5, 2005
I'm sure this is really simple... apologies, but a search hasn't thrown up any clues.
I have a table with Invoice Value, and Commission Value in it. On the associated form I enter the Invoice Value, and also the Commisison value [which 99% of the time is set at 20%.
I am trying to make a button which, when pressed, enters the calculated commission in the form field (and underlying table) - I realise this could be in the 'On Click' property on the form, but in VBA I am after something like.
Private Sub btnCommCalc_Click()
tblSales.Commission = tblSales.Invoice * 0.2
End Sub
Could someone help me with the syntax? (I can then move on to using a variable, rather than hard-wiring the 20% ;-)
Many thanks
View 8 Replies
View Related
Jul 23, 2015
Is there any way to press a command button a certain amount of times based on a value in a text box.
i.e.
text box value = 5
button gets pressed 5 times with one click...
View 14 Replies
View Related
Dec 16, 2011
Is there a code for when I press a button it refreshes and clears out certain text boxes in my form?
View 1 Replies
View Related
Jun 4, 2014
In the form1 , I have a listbox1 with 2 columns. The values get added in the listbox using vba. Now I want to Edit the listbox values in case user enters something wrong. So when the user selects a listbox item and then EDIT button then form2 gets opened. And the textbox1 of it stores column1 of listbox1 value and textbox2 stores column 2 of listbox1 value. So the user canb make changes in the textbox values and then press SAVE button . Now I want the code that will make those changes in listbox1 of form1 and unload form2 then.
View 2 Replies
View Related
Apr 12, 2013
I can add record successfully... but can't view it accordingly when I press navigate buttons in the form...
Database is attached ....
View 10 Replies
View Related
Nov 23, 2006
Hi everyone,
i am quite a begginer at this so sorry for the simple question
I am running a access query from a vba code. IN the vba code I am writing the sql command.
I am getting the criteria for the sql code (WHERE command) from a number of combo boxes in a form.
The whole thing works quite well when I have something selected on all combo boxes but it does collapse when one of the combo boxes has the default value which is "" nothing.
for instance when I have
WHERE domicile.IdDomicile = 5
works fine. 5 comes from the combo box
when there is nothing selected in my combo box the sql code would be
WHERE domicile.IdDomicile =
and then I get an error msg saying the query is wrong.
Question,
what is the command in sql that instruct the query to return all records.
I tried using "*" when the combo box was not selected but then I dont get the records that are blank, only the ones with something writen in it.
Any other suggestion for this
Many Thanks
K Regards
View 4 Replies
View Related
Nov 20, 2007
Hi,
i've got a query that is linking 2 tables.
i'm having problems with the join properties.
basically from what i can understand, there are 3 options.
1. Where join field from both tables are equal
2. All records from table 1 and only those from table 2 where they match
3. All records from table 2 and only those from table 1 where they match
how do i go about having all records from both tables showing?
View 10 Replies
View Related
Dec 3, 2013
I have a DB of books and a form to search for multiple fields including ranking (combo box). The way I have it now is to pick "3 stars", "4 stars", "5 stars". What I want to do is have it so that if I pick "4+", it will show all records that have 4 stars and 5 stars and "3+", it will show records with 3, 4, 5 stars.
View 14 Replies
View Related
Jul 4, 2013
I'm having a mental block on this one.
I have a table with a yes/no field. It's linked to a form with a yes/no box, but the outcome I want is that if the form box is unchecked, the query returns all the "yes" records - which is trivial; however I want to return ALL the records if the form box is checked.
View 1 Replies
View Related
Aug 9, 2007
Hi
Bit of an Access beginner and am trying to sort something out for work - not sure why they've asked me!
I've created a query to search on a couple of items using drop down boxes on a search form I created. This bit of it works fine, I used this site http://www.fontstuff.com/access/acctut08.htm and copied what he had done. This is fine.
I now want to add a date search to the same query. I know I can use Between [..] AND [..] but if I leave the boxes blank it finds no records. I'd like it to search and include all.
Ideally I want to include 2 extra text boxes on my form that I can put a to and from date in (or not put a date in and it find everything).
Hope that makes sense, please can someone do me an idiots guide?
Many thanks
Phil
View 5 Replies
View Related
Oct 16, 2012
Three tables:
Employee, Sessions, EmployeeSessions.
Many sessions can have many employees - thus the joining table has been included.
When trying to delete an employee from the database using a form, I encounter the error:
The record cannot be deleted or changed because table 'tblEmployeeSessions' includes related records
Is there a problem with my table relationship structure? Or is it 'correct' that as the employee is supervising a session he/she cannot be deleted as this would interfere and maybe mess up the session record?
View 2 Replies
View Related
Aug 10, 2005
Hi
Each month I use Access to import text files and export cleansed data to Excel.
The information contains (i.e. forecast data) that has 6 months of data. Each month, the data is rolled over to include the new month and delete the oldest month of data.
Is there a query(s) or module that can automate this process?
Would greatly appreciate any tips on this one!!
Lucas
View 1 Replies
View Related
May 4, 2008
I have a table with a string field for a street. It might have data such as:
Bleeker Street
or Bleeker St.
I want to create a query that will enable the user to search for a string by entering a parameter. Is there a way to construct a query using wildcards for a string so that if the user types in "Bleeker" both the above values will be returned?
Thanks.
View 2 Replies
View Related
Jul 10, 2015
How can I include a field from a table in to a query - that has no relationship?
For example...
The 'Despatch' field is in a seperate table called 'Product', because we despatch multiple products for any ONE order at different times, so it needs to be against the Product and not the full job itself.However, when I include the 'Product' table into the query and insert the 'Despatch' field into my query, and run it comes up with an error...
"The SQL Statement could not be executed because it contains ambiguouse outer joins. To force one of the joins to be performed first, create a seperate query that performs the first join and then iclude that query in your SQL statement". Here's the current SQL statement
Code:
SELECT [Materials Requested].[Job No], [Materials/Orders].Total, Jobs.[Project Name], Product.Despatch
FROM Product, Orders INNER JOIN (((Customer RIGHT JOIN Jobs ON Customer.[Customer ID] = Jobs.[Customer ID]) INNER JOIN [Materials Requested] ON Jobs.[Job No] = [Materials Requested].[Job No]) INNER JOIN [Materials/Orders] ON [Materials Requested].[Materials Requested ID] = [Materials/Orders].[Materials Requested ID]) ON Orders.[Orders ID] = [Materials/Orders].[Orders ID];
View 1 Replies
View Related
Apr 24, 2013
I have the following query, which I simplied to show only the WHERE clouse.
Code:
WHERE ((([Using our own appt date].PrblDiagCode) Like "519" Or ([Using our own appt date].PrblDiagCode)="414" Or ([Using our own appt date].PrblDiagCode)="428" Or ([Using our own appt date].PrblDiagCode)="250" Or ([Using our own appt date].PrblDiagCode)="430" Or ([Using our own appt date].PrblDiagCode)="585" Or ([Using our own appt date].PrblDiagCode)="573"));
Is there any way to also include the ones with fractions? For example, a record can be 519.3. I find that the current code doesn't give me the ones with fractions. What needs to change in the query?
View 1 Replies
View Related
Oct 29, 2014
I have a table with many records, using a form with an update button click event, I would like to update ALL records where the Item in the table = the Item in the form.
There are 6 checkboxes and 6 text boxes that will need to be updated, but right now I am just trying to test if i can even change one text box to keep it simple. I have tried to start by using this:
Code:
Dim mySQL As String
Dim ItemNo As String
Dim SO As String
mySQL = "UPDATE BT200 SET Part = '" & SO & "' WHERE Item = " & ItemNo
DoCmd.RunSQL mySQL
So every time i run this command button, it gives me a prompt "You are about to update 0 row(s)". Nothing gets updated at all, I am clearly missing something vital here.
View 7 Replies
View Related
Jun 7, 2013
I am using Between Me.Firstdate and Me.Lastdate in a query. I thought that it would include both Firstdate and Lastdate in the range. But it appears that it does not. Is there a way to include Firstdate and Lastdate in the range of dates?
View 13 Replies
View Related
Mar 21, 2013
I am receiving this error when i try to run a query:
"You tried to execute a query that doesn't include specified expression as an aggregated function"
There are two images attached which show the SQL view, the error and the design view.
View 11 Replies
View Related
Jul 22, 2014
I have written a user defined function that calculates the end of the current month. This I named EndOfThisMonth. It works well as a function. Now I would like to use it as date criteria to include in a query. The function is included as such EndOfThisMonth().
The field on which this function is to enter as a criteria is another calculated date function called Due.
When I run this query I get an error message saying Undefined Function 'EndOfThisMonth' in expression.
View 3 Replies
View Related
Mar 24, 2013
I am trying to do the good 'ol sales report (query) to include customers with no sales.
I have a customers table, account number table, sales table & sales (line) detail table. (all linked in that order)
If I run a query to show customers (in the customer table) with account numbers, that works
An unmatched query to show customer without an account number works (but of course the unmatched account number field isn't shown).
How can I get the two two be shown together with the "unmatched" having a null or 0 for their account number?
I am guessing in principle, the resulting solution can be modified to show customers without sales alongside those with sales?
View 3 Replies
View Related
Sep 18, 2007
Hi,
I've read a few posts regarding removing the facility of the F11, open Db window, but is there a way to capture if someone presses F11?
I have a few people (users) who think they know a thing or two about Access and I'd like to know if/ when they're accessing the Db window.
I was hoping for the ASCI code or similar for the F11 key!?
Thanks
Matt
View 4 Replies
View Related