Search results

  1. J

    Query Help Please

    Hello, I have a query which i'm having a problem with. I have ID, Name and 10 numeric fields. I then want to have a 14th field which is the average of the 10 numeric fields. Is this possible? If so, how? I've tried Average: AVG(field1+field2+field3 and so on) but this doesn't work. It gives...
  2. J

    Sql

    Hello, I am in SQL enterprise manager, and trying to create a function which will give me, among other things, the current year. The trouble I'm having is that I can't get the current date first. I've tried : SELECT GETDATE(), but I get an error saying invalid use of getdate in a function...
  3. J

    Left Function

    Hello, I have used the left function to provide me with the left x characters of a field, which works fine. Description: Left([c$products],[diff]) However, I want to query this field to only give me certain descrpitions, but it will not work. Can anyone let me know if this is possible, or if...
  4. J

    Last Month

    Hello, I have a query which pulls data based on a date range. However, instead of using this, I'd like to only get data for last month. I have tried doing this by adding 2 fields : Month: Month(myDate) and Year : Year(myDate) In each of these fields I have added a criteria of ...
  5. J

    Weekday

    Ok - I have a problem which I have narrowed down to the following : If I use the "weekday(mydate)" function on a dataset held in a table it works fine. However, if I use it on a dataset which is a query based on a table, it doesn't work. For example : - I have 100,000 records in tbl_data - I...
  6. J

    Sorting By Date

    I have the data below in a query in Access, and I want it to sort by the Week Begin date. I have put a sort on for 'Ascending' but it doesn't work. (Due to the 29th being after the 28th - regardless of month) Is there any way I can force the sort in this query ? It must be in the same query...
  7. J

    Top 10 Query

    Hello, I currently have a query which provides me with the Top 10 records. However, it sometimes shows me say 13 records, if the last 4 records have the same number. How can I get round this ? Thanks in advance J.
  8. J

    Sort By Month

    Hello, I have the following query which gives me a count by day. However, it sorts by day instead of day/month. For example: 01/01/05 01/02/05 01/03/05 02/01/05 02/02/05 and so on... Can I sort so it will show me all of January, then all of Febuary etc? Thanks. J.
  9. J

    Loop Without Do

    I'm getting the following message when I try to run one of my routines (it imports names and addresssed from a table into my program) I definitely have the DO Statement, so cannot see where I am going wrong. Does anyone have any ideas ? Thanks. J. My code is here : Option Compare Database...
  10. J

    Date Criteria

    If I run a query from say 1st February 2005 to Today's Date, I put a criteria of "Between 01/02/05 and Date()" This works fine. However, I want to run this alongside another query which provides the same data for the same period last year. So what would the command be if I wanted the same for...
  11. J

    3rd Query giving Results of 2 other Queries

    Hello, I am trying to get a query working in Access, but am having problems. I wonder if someone can have a look at it, and let me know where I am going wrong ? Firstly, I run 1 grouped query based on a single table of records with a date criteria of yesterday's date. I group by the area...
  12. J

    Password Check

    Hello, Can anyone shed any light on why the following code will not work when I split my DB into Front end / Back End. It worked fine when all tables and everything were local, but since the split, it just won't work. I don't receive an error, the button it is linked to just doesn't function...
  13. J

    Button to Export Data

    Hello, I have created a button on my form which when pressed does the following : 1) Run a pre-defined Macro, which is picking up a query and running my data to excel. However, I need the data to export into Excel in a certain format, i.e it needs to begin importing at cell A4, and in truth...
  14. J

    List Box in Form

    Hello, I have a List Box in my DB on a form, which when the form is opened, the list box displays the date relating to the records. (Date, Person etc) How can I get it so that when I open the form, ONLY the records with a date within the current month are shown. Thanks in advance. J.
  15. J

    Closing Form

    Hello, I have a couple of queries please ? 1) I have an entry form of sorts (FrmEntry), and when the date loses focus, if it is past a certain date, an outlook OFT file opens. This is all spot on. However, can I make it so the form I am currently in (FrmEntry) closes when the OFT file is...
  16. J

    Date Problem

    Hello, I have a DB, which when I enter a date into the DateTo field, a box is populated with a Cut Off Date (this cut off date is held in a table against each week). For example, the table would be : WeekEnding - CutOff 25/06/04 - 10/05/04 02/07/04 - 08/06/04 and so on.... Therefore, I have...
  17. J

    Password

    Hello, I use the following code to allow deletion of records : Private Sub CmdDelete_Click() Dim Password Dim PassBox Dim intmsgresp As Integer Dim db As Database Password = InputBox("Enter Password to Delete Record", "Password") If Password = "Admin" Then Set...
  18. J

    List Form

    Hello, I have a list form in my database, which when opened displays certain information from my records (name, date from, date to etc). I also have a few text boxes which when text is entered into them, the list box on the form is filtered accordingly (so if I type my name, only the records...
  19. J

    Outlook OFT Files

    Hello, Can anyone please tell me whether it is possible to open an .OFT file from within a form ? I have used the wizard within the form, but when I click the button to load the OFT file, it opens a new outlook message from me, with this OFT file attached. Obviously I want the OFT just...
  20. J

    Top 10

    Hello, I'm trying to run a query to give the top 10 records. However, if there is a joint 10th, for example records 9, 10 and 11 all have a count of 15, then I only want the 10th. Can this be done ? I have tried using unique values and unique records within the properties of the query, but it...
Back
Top Bottom