I am using a table called "Numbers" in the table your auto ID field and Cellphonenumber. I have create a form where the user can input the cell phone number only. Once they press Enter it runs the query called NumberCount where it take the cell phone being entered and the query counts how many times it has been entered and gives you the value in a field called TimesBrought which is a calculated field based on number of entries of that cell phone number entered. Now what i want to do is have a pop up message that will pop up if the cellphone number has been entered 10 or 20 or 30 or 40 times. I have tried using a IIf statment under the query criteria. But i'm not coming right. Please can someone point me to the right direction.
Related
I am working on an MS Access report. It is about employee service records. This report asks a parameter which is the ID of the staff member and displays multiple records of its punishments. What I wanted was to skip a serial number of records based on type of punishment. For instance, I do want to skip number for a punishment that contains word 'aside'. So for this, I have added a serial number using a textfield making its control source=IIf([PType] Not Like "*aside*",1,0) its result like this.
The problem here is number 5 is repeating 2 times(as it contains 'aside' string). But I want that highlighted row shouldn't contain any number and next two to it should be numbered 6 which is correct already. My background is from MS SQL server. I can't handle complex VB code.
I have created a form whose comboboxes get "DISTINCT"-populated with values (from a table), which means nothing is selected at first, but the combobox offers a load of values to select from named table. In Field 1 I select a value and then Field 2 automatically loads in only values from the table where the criteria fits the value from the first field and so on. This way, I am narrowing down the numbers of applying recordsets from my table down to 1 or 2 just by clicking and choosing options. My Form looks this way.
I have a total of 16 rows where in each row I can narrow down parameters to 1 specific item from the table.
With pressing a button, I can write these values into another table where they will get a save ID and a save name. This all works flawlessly.
I also added a loading button, where I can select the savenames from the savetable and the form will automatically get filled with the values from the savetable. But as soon as I do this, no values are suggested anymore in the field that contains multiple Columns. I tried a Requery, I tried reassigning the Rowsource, I tried just deleting the values in the fields before, nothing helps. I have to use my "erase" function where I set all fields to "Null" to be able to get the "suggesting values" back to work.This is how it looks after loading
In the regarding field should be at least 3 values which get not displayed anymore.
It feels like filling the forms' fields with comboboxname.value = rs!valuefromsavetable deletes or blocks the rowsources from working.
Can someone help me here?
Using Access 2013 I have a calculated a column in a query that is the datediff from a clients intake date to now(), the formula is:
DateDiff("d",[table1]![intake_date],Now())
So the column will give the total number of days the client has been our client. This works great. Each client has a total number of days populated. Now what I want to do is add those numbers up to find the total number days from that column. What I can't figure out is how to get a sum of that column to populate in a textbox. I have a form with a textbox that I want to sum to show in. The formula I assumed would work is
=Sum([queryname]![columnname])
but that is not working.
=Sum([columnname])
can only be used if columnname is a field in the form's RecordSource.
Typically in the footer of a continuous form.
To show the sum of a query that is independent of the form, use the DSum function:
=DSum("columnname", "queryname")
One main purpose of a database is to make user entry concise - enter data once and reuse/display that data in different places without requiring the user to enter it again.
In my database, I sometimes have identical data I need to enter in many records, for example, ages of employees. Perhaps I know that 10 employees I just hired are all age 25. Instead of entering 25 once for all employees, I'm looking for a way to enter the number 25 once, and let me select all employees I want to apply the data to. That way, click once to open the form, I type 2 characters, and click 10 times to select 10 employees, and then click once to close (total 12 clicks 2 characters typed) as opposed to clicking to open a form 10 times, typing 2 characters 10 times, and closing the form 10 times (total 20 clicks, 20 characters typed)
Basically, using an access form, how can I type one value, or select one combo box item, and apply it to multiple records with the same column name?
In principle: Your employees table has a Yes/no field. You create a continuous form showing their ID, names and the Yes/no field. You click yes for all employees. The yes/no:True is a parameter in an update query.
The update query has the employee ID, the yes/no where True and another field that you want to update. Each time you to want to run the procedure you amend the query as required in the 'other' field, close it, open the form, make your selections as to who is to be updated and run the query, probably by a command button. As it's an action query I would also include in the command button some sort of warning via MsgBox.
You can copy and paste the value with Ctrl+C and Ctrl+V. That will make 1 + 25 keystrokes = 26 keystrokes.
No programming will beat that.
While the users have fun with this, you can concentrate on core stuff of the application.
guys
' i am beginner in access 2007 and i want to create a form that contains many fields (product id, product name, etc and date of transaction) and use a query to search for data
in other words for example i want to enter in this form a date range i.e from 1/1/2013 to 1/03/2013 and search for product x ( attention ) my basic table contains only date of transacton field and not the from, to fields ( the from , to fields i want only to add them in the search form and them to search based on the value or date of transaction field ) please help me
Short but sweet answer;
Create a new "Query" using the GUI. Add your table to the top part. Double-click columns in the table to add them to the output of the Query.
Next, in the query conditions (grid below the name of each field) use brackets "[]" around your from/to dates. E.g. the query condition underneath your date field may be;
"between [MyStartDate] and [MyEndDate]".
Now "run" the query to test it; Access will prompt you for 'MyStartDate' and 'MyEndDate'.
Finally; if you save this query and set it as the "Data Source" for a Form, you may alter the above condition slightly to pull the values automatically from the form itself, so that you are not prompted every time the query runs. E.g. this condition may be;
"between Forms![MyTableForm]![MyStartDate] and Forms![MyTableForm][MyEndDate]".
You will have to play with it a little, but those are the basics.