Access 2000 Query
Al3xandr3
Posted messages
35
Status
Member
-
ibou -
ibou -
Good evening,
I'm working on MS Access 2000, nothing too complicated except that it's the first time I'm using this tool lol
After browsing the internet and the tutorials for the software, I found this command: [nb = DCount("*","NomRequete")]
The problem is that I am either foolish or too tired to use it correctly (I prefer the tired option between us lol).
I created a database with references (for example: animals) as primary keys and several actions (for example: bathing, vaccination) as fields with calendar week values (for example: W10).
The goal would be to query the database to find out how many animals were bathed in week W10 and vaccinated in week W30 lol
This is how I typed the command:
1= DCount("S10","Lavage S10")
Thanks in advance for your help.
Oh yes, I almost forgot, I have fields (3 in total) with a Yes/No value (the box that we check), is it possible to make it so that I can only check one box out of the three?
Thanks again.
I'm working on MS Access 2000, nothing too complicated except that it's the first time I'm using this tool lol
After browsing the internet and the tutorials for the software, I found this command: [nb = DCount("*","NomRequete")]
The problem is that I am either foolish or too tired to use it correctly (I prefer the tired option between us lol).
I created a database with references (for example: animals) as primary keys and several actions (for example: bathing, vaccination) as fields with calendar week values (for example: W10).
The goal would be to query the database to find out how many animals were bathed in week W10 and vaccinated in week W30 lol
This is how I typed the command:
1= DCount("S10","Lavage S10")
Thanks in advance for your help.
Oh yes, I almost forgot, I have fields (3 in total) with a Yes/No value (the box that we check), is it possible to make it so that I can only check one box out of the three?
Thanks again.
5 answers
Hello,
you need to make a request like this:
SELECT count(*) from TABLE WHERE bain="S10" AND vaccin = "S30";
For checkboxes, it's not possible in normal input, but it is possible by restricting input via a form...
--
See you, Blux
you need to make a request like this:
SELECT count(*) from TABLE WHERE bain="S10" AND vaccin = "S30";
For checkboxes, it's not possible in normal input, but it is possible by restricting input via a form...
--
See you, Blux
"Stupid people dare everything. That's how you recognize them."
Thank you Blux, it works great.
Sorry for abusing your knowledge, but is there a way to automate the request so that I don't have to type the same request 52 times for the upcoming weeks?
Thanks in advance.
Sorry for abusing your knowledge, but is there a way to automate the request so that I don't have to type the same request 52 times for the upcoming weeks?
Thanks in advance.
The simplest thing would have been to put the date of the action, then we could easily find the week...
Because right now, the possibilities are multiple for multi-criteria research...
What exactly is the query that you want to run 52 times?
--
See you, Blux
Because right now, the possibilities are multiple for multi-criteria research...
What exactly is the query that you want to run 52 times?
--
See you, Blux
"Fools dare to do anything. That's how we recognize them."
In short, I manage different construction sites where the planned actions occur over weeks.
In total, I have 187 records for 18 fields, 8 of which contain dates formatted like this example S10.
Since the 187 managed sites span the entire year, I deduced that I need to repeat the query n times for each action and each week.
To avoid a certain heaviness in the script of 187*8, or 1496 times the same query to type, I thought about automating the query with something like this:
For S= 1 to 52
SQL Command (the one you gave me)
Next
That's roughly the overview.
Thank you for your kindness.
In total, I have 187 records for 18 fields, 8 of which contain dates formatted like this example S10.
Since the 187 managed sites span the entire year, I deduced that I need to repeat the query n times for each action and each week.
To avoid a certain heaviness in the script of 187*8, or 1496 times the same query to type, I thought about automating the query with something like this:
For S= 1 to 52
SQL Command (the one you gave me)
Next
That's roughly the overview.
Thank you for your kindness.