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

    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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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, ....?
  11. G

    Write Conflict Problems

    I am working with varying degrees of luck and satisfaction on Access 97. On one form I select a vehicle (Shop) to place in service. Once In Service I want to note when it was placed in Service and by whom. I can get it to assign the times and date, but on returning to the form and attempting...
  12. G

    Why is it Null?

    I've come a long way on Access 97 in a few days thanks to all here. Now I have another problem. I have a form based on a table of Vehicles. The header of the form states who is using the program. This is shown on an unbound field "User" and comes from the table LogOn. I need to assign the...
  13. G

    Incomplete info Message Box

    Still learning the wonders of VB. Right now I am wondering how to have a Message box appear if the user has or is exiting a control and leaving it blank. I want the message box to return the user to the empty control once the OK is clicked. I tried using the validation properties, but it...
  14. G

    Set primary key based on date

    My VBA experience to this point is rather limited. Hopefully that will be changing soon. What I wish to do is create a primary key for a table based on the date and the number of records created on that date. My hopes is to have the data shown as an integer in the following format. yymmddrec#...
  15. G

    Minimize and Maximize code

    I'm looking for some simple code that I can put in a form for the "on click" event. All I want is for it to open a second form, maximize it, and then minimize the first form. If possible I would also like it to run a macro that loads some information on the second form between the minimize and...
  16. G

    Keep forms maximized

    In creating my forms I have taken off the close and resize buttons, and placed a macro that tells the form to maximize on opening and current. A group of macros runs a variety of reports and places them in print preview. The report form has a resize button but not a close in the upper right...
  17. G

    Losing data via a combo box

    I have a form that uses a combo box to find the proper record in a table to add, delete and change data in. I have a curiously interesting problem. In the form I have 3 columns of data that would be manipulated. When I click on any of the choices in the combo box it deletes the data in the...
  18. G

    Check for duplicates

    I have a total of 3 tables monitoring the use of vehicles and equipment assigned to them. Each vehicle is assigned equipment as it goes in service and the equipment is returned when it goes out of service. The "Vehicle" table shows the status of the trucks, while the "Equipment" table shows...
  19. G

    Subforms and Combo boxes

    I have created a setup roughly based on the Norhtwinds sample. I am trying to work with the data from a series of linked tables; Orders, Order Details, and Items. Each item has a category and subcategory. I've created an order form and an order details subform in which I wish to have a...
  20. G

    Self filling combo boxes

    This may have been posted twice. I apologize for that, but the initial post had poor formating on my part. For many this may be a rehash of info, but I can't seem to grasp the technique properly. I am building a series of tables very loosely based on the Northwind sample. The purpose is to...
Top Bottom