Search results

  1. G

    Delete Duplicate Detail Record

    I am building a database patterned directly from NorhtWinds. In the "Order Detail" table the primary key is based on 2 fields. This will not allow a duplicate product to be ordered, but it waits until after the update to advise you. Also it requires that another product be ordered instead of...
  2. G

    Do not add record

    I'm trying to write what must be simple code. Quit simply, when the user want to close a form, do they want to save this new record or not? I've gotten this far, but am not sure how to discard all the entries on this new record. There is one link to another table on this form. This form...
  3. G

    Insert Into Statement

    That got it working Robert. Thanks. However, can you enlighten me as to the difference of using: db.Execute or DoCmd.RunSQL ? Which method is proper? Advantages? Disadvantages?
  4. G

    Insert Into Statement

    I want to insert 3 fields from one table to another using code. Old Table = "Current" New Table = "Utilization" Fields = Index, Date, Time This is causing poblems due to a Compile error Expected : end of statement Dim db As Database db.Execute INSERT INTO Utilization (Index, Date...
  5. G

    Equipment Utilization

    The email with some better descriptions of what I am trying to do is on it's way. Thanks for the assist, you are a real source of help here.
  6. G

    Equipment Utilization

    I need to generate a report that shows equipment utilization over a time period. Given a period of days and the times of interest how many times was all the equipment in use and for how long each occurrence. I have a database in which I have tracked on what days a piece of equipment was used...
  7. G

    Equipment utilization

    I need to generate a report that shows equipment utilization over a time period. Given a period of days and the times of interest how many times was all the equipment in use and for how long each occurrence. I have a database in which I have tracked on what days a piece of equipment was used...
  8. G

    Autofill a field

    I am only using one table, their is no relation set up with another table. I tried to use a combo box to fill it automatically, but it always returned a blank field above the correct answer, resulting in the user having to stop and choose the name. I couldn't find a way to eliminate the blank...
  9. G

    Autofill a field

    So far I'm getting close but haven't been able to make it work yet. Here is what I have: Private Sub txtSecndEmpNum_AfterUpdate() Dim db As DAO.Database Dim rst As DAO.Recordset Set db = CurrentDb() Set rst = db.OpenRecordset("tblSimpleCheck") rst.FindFirst...
  10. G

    Autofill a field

    It must be simple. I need to fill a field on a form based on the contents of the previous field. The table has a collection of records that include the leadEmployeeNum and leadEmployeeName. When entering the employee number I wish the employee name to be entered in the next field. If there...
  11. G

    Where'd they go?

    I'll give it a look see in the morning. I am using A2K, but I find it interesting that on two databse systems made on the same machine, one allows the dim and the other doesn't. Not complaining as long as I can get it to work, just curious why it works on one database and not the other. And...
  12. G

    Where'd they go?

    I was trying to build some code when Access would not let me diminsion a variable name as a database. Inititally I was just cut and pasting some old code that I was going to reuse and Access would hang at the dimiension statement. But when I tried to write it myself, it failed to show it as an...
  13. G

    Weekdays per month

    Thanks Pat. Though that was not the method that I've ended up using, it did give me some ideas. Unfortunately the method that I ended up using is somewhat akin to reaching around your back to scratch your elbow. It works, but there must be an easier way.
  14. G

    Weekdays per month

    Would this be a function in VBA? Where does it get the information on the days in a month? I would use the table that I built, however there is no assurance that all days of the year will be found in it. The problem with that would be that if it found 4 occurences in the table, but they...
  15. G

    Weekdays per month

    To calculate an average in my report, I need to determine the number of weekdays, Sundays, etc, in a month of any given year. This will allow me to divide the sum of incidents occuring on Sundays by this count to generate the average. Any ideas on how to generate this number? Using the...
  16. G

    Averages

    I've built the query to breakdown by year, month, day and hour. I can group and sum appropriately. It is the averaging that is giving me grief. I want to show the average number of incidents on any given Day of the week, based on Year and Month. If I have number of possible incidents that...
  17. G

    Averages

    In a query, I have a large list of records that I need to breakdown and examine for when they occur, by year, month, day of week, and eventually hour of day. I've identified which records that need to be included with an IIf statement. If it qualifies for examination it recieves a "1" else a...
  18. G

    Sorting by Month Number

    Thanks for the help. I'm looking forward to putting it in place.
  19. G

    Sorting by Month Number

    I am trying to create a report that breaks down by months. However the sort order is incorrect. In the query I created: MonthNum: Format([DISDATE],"m") But the report sorts in the following manner: 1, 11, 12, 2, 3, 4 ..... How can I make it sort 1, 2, 3, 4, ....?
  20. G

    Incomplete info Message Box

    Thanks for the help. I ended up placing the code in the "On Enter" portion of the next control box. This seems to work better for some reason. Also made it easier to excape the form if needed.
Top Bottom