Search results

  1. E

    Days since last entry

    Thanks for the replies, guys! I think I've got it!!
  2. E

    Days since last entry

    This works on my test dataset, but when i try it on my actual table, I get the very first date the account was balanced for all the records that have that account. SELECT dbo_Balances.BalanceID, dbo_Balances.AccountID, dbo_Balances.Balance_Date, dbo_Balances.Difference, (SELECT Top 1...
  3. E

    Days since last entry

    If you look at the example data I provided, the first set is what I have to work with. What I want to do is compare the date in BalanceID 1 to the date in BalanceID 2. The second set is what I want the resultant query to look like. Sorry, the tables didn't come out as clear as I would have wanted...
  4. E

    Days since last entry

    Thanks for the reply! DateDiff doesn't help me - the problem is that the two dates I want to compare are in different records. Any other ideas?
  5. E

    Days since last entry

    All, I have a table that contains balances for certain accounts by date. At certain intervals, a new record is added for each account. I am trying to measure the intervals for each record (basically, the number of days since the last balance). The data looks like this: BalanceID AccountID...
  6. E

    Removing Debug option when scripts hit errors

    Use a custom error handling routine. You can set it up so that the error is logged to a table, which you can then review later. Alternativley, you could even set it up to email you. If you use a custom error message, the user won't have the option to hit debug. However, a clever user might know...
  7. E

    Empty combo box help

    You have a couple of options. First, you could just hard code the names of the boxes to check instead of looping through all controls, like so: If me.cbo1 & "" = "" Then MsgBox "Missing data in cbo1" Exit Sub End If If me.cbo2 & "" = "" Then msgbox "Missing data in cbo2"...
  8. E

    Find Duplicate PrimaryKey Violation...

    What you can do is this: 1. Create a copy of the table (structure only, no data) 2. Set the primary key on the new table 3. Append data from the old table to the new. Only 33,093 fields should append. 4. Do an Unmatched query on the old and new tables. This should report the 6 problem records.
  9. E

    Duplicate records

    You can set an index on both fields that will prevent duplicates.
  10. E

    Excel Help Please

    I'm not really sure. I know that you can loop through all open workbooks and check the name like so: With xlObj.Application For Each wbk In .Workbooks Debug.Print wbk.Name Next wbk End With However, I don't know how you could modify that for multiple instances of Excel being...
  11. E

    Excel Help Please

    This will show you how to tell if Excel is running: http://www.mvps.org/access/modules/mdl0006.htm
  12. E

    Search for a folder

    You can use the Dir() command to check if a folder exists. Check out VBA help.
  13. E

    Invalid use of NULL

    You can just say: [Notes] = [Notes] & " " & strConcatenation There is no need to assign the value of [Notes] to a variable first. Of course, if [Notes] is null, there will be an extra leading space. You could use: [Notes] = ([Notes] + " ") & strConcatenation if you do not want the extra...
  14. E

    Query by Date Issues

    You would only put: <#1/1/06# in your criteria field. You don't need to type the where part.
  15. E

    Stop warning

    You need to put the error handling code on the sub that is causing the error. In your case, the sub that is casuing the error is the on_click event, therefore you need to trap the error there.
  16. E

    Show Record If Our Group Is Not Listed

    I assumed your table was called tblGroup, just change it to match. SELECT tblGroup.prb_no, tblGroup.seq_no, tblGroup.commitment_user_group_cd FROM tblGroup WHERE (((tblGroup.seq_no) In (SELECT tblGroup.seq_no FROM tblGroup GROUP BY tblGroup.seq_no HAVING...
  17. E

    Query by Date Issues

    I don't see why you wouldn't use: WHERE tblOrders.OrderDate < 1/1/06
  18. E

    Stop warning

    Yes, removing the "MsgBox Err.Description" will work. However, you will never recieve an error message about any error. That may not matter to you, but if it does you can use my above advice to automatically ignore the cancelled error but report any other error.
  19. E

    Stop warning

    Nope, its an error. The reason being that you asked Access to open a form, and the form did not get opened. Therefore, the DoCmd.OpenForm method results in an error. When you get the error, you can just control-break to go into your code and type ?err.number in the immediate window to get the...
  20. E

    Double clicking Query list box results

    First, make sure the first column (visible or not) in your listbox is the primary key of the record. Then, on the DoubleClick event of the listbox, you can use the following: Docmd.OpenForm "frmYourForm", , , "[PrimaryKeyField] = " & me.lstBox Just make sure to add the name of your form, the...
Top Bottom