Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. danvlas

    Regular user slow login

    Thank you for trying to help me out. This is what Access seems to be sending to the server: --================================================= declare @data1 datetime, @data2 datetime, @ms int select @data1=GETDATE() select object_name(id), user_name(uid), type, ObjectProperty(id...
  2. danvlas

    Regular user slow login

    Hi there, Here is my problem: SQL Server 2008 R2. MS Access Project(adp) application connected to the server. SQL Server Authentication. If dbo logs in, first application query starts in 2-3 seconds If regular user logs in, first query starts after 30 seconds. After that, everything is fine...
  3. danvlas

    trigger question

    You will get the number of updated records. INSERTED will contain the new values DELETED will contain the old values Both will have the same number of records. [pipe] Daniel Vlas Systems Consultant
  4. danvlas

    Trapping error codes from SQL server??

    I would use Try-Catch. Set a varchar variable to the string you want, then just raiserror(@Variable, 16,1) Then, in the Catch block: select @Variable=Error_Message() raiserror(@Variable, 16,1) Something like: Begin Try --code to check certain conditions select @Variable = 'Whatever text you...
  5. danvlas

    Update Query Loop Question

    In the fisrt example, I still think that UPC 456 should be assigned to store 1000. Why? Because there is no rule, and I prefer 1000, not 1002. Just kidding. In the new example I might understand what you're after, if you explain why 678 is assigned to store 1004 instead of 1001 (which would...
  6. danvlas

    Update Query Loop Question

    You need an additional relationship. Now it's ambiguous, there is no way to know which UPC should be assigned to which store. For instance, why is UPC 456 assigned to store 1002 and not to 100, like item 123, which has the same rank A? All you can do now is to see which UPC's *could* match...
  7. danvlas

    Previous Record in Access

    1. No, it's not too late. I tested it. I also tried the On Format event, but it populated even the box in the first detail with the value of the last detail in the report. That's why I moved the code to On Print. 2. As I said, I referred to the current case. I never say never :-) 3. So do I...
  8. danvlas

    Problem passing variables SQL query

    And keep yourself on the safe side by changing YEAR = to [YEAR] = Even better, if possible, change the name of the field. "Year" is a reserved word (a function) HTH [pipe] Daniel Vlas Systems Consultant
  9. danvlas

    Previous Record in Access

    Try something like: Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer) 'Dim a static variable so that it keeps its value between calls. It will be a zero-length string for the first record displayed in the report. Static PrevValue As String 'Do whatever you want with that...
  10. danvlas

    Previous Record in Access

    I'm almost positive that Duane spotted the issue, so I'd suggest focusing on his questions... [pipe] Daniel Vlas Systems Consultant
  11. danvlas

    Retrieve email from POP3 account into my database?

    I think you should read about CDO (or even CDONTS). I vaguely remember that CDO object model allowed one to fully query an email account. HTH [pipe] Daniel Vlas Systems Consultant
  12. danvlas

    Outer Joins are my nemisis

    I think a good lesson is much more worth than just solving one little problem. One is from me. [pipe] Daniel Vlas Systems Consultant
  13. danvlas

    recordset type mismatch

    I would delete this first: Set rst = Recordset [pipe] Daniel Vlas Systems Consultant
  14. danvlas

    Viewing A Report Opened Via Pop Up Form

    You shouldn't replace anything. Copy the code. Open the report in design view. Go to View-Code Paste the code Save the report. Open it from your form. The form should disappear before the report is displayed. It should re-appear on screen when you close the report. Just tested it, with a...
  15. danvlas

    Assign custom function to field in report (openrecordset problem?)

    The syntax you're using suggests DAO. So try: Dim rstResult As DAO.Recordset [pipe] Daniel Vlas Systems Consultant
  16. danvlas

    Assign custom function to field in report (openrecordset problem?)

    Is rstResult a DAO.Recordset or ADODB.Recordset? You haven't fully qualified it, maybe ADO has a higher priority. [pipe] Daniel Vlas Systems Consultant
  17. danvlas

    Filter report dynamically once run

    But you may create a pop-up form that pulls all field names from the open report, then build the filter criteria within the form and apply the filter on the report by clicking a form button. (rpt.Filter = strCriteria and rpt.FilterOn=True) If that doesn't work, the form can close the report and...
  18. danvlas

    Viewing A Report Opened Via Pop Up Form

    You may try to control the form visibility from the report. The following will hide/show the form from which the report was invoked, regardless of its name or other properties: Option Explicit Dim frmCallingForm as Form Sub Report_Open(Cancel As Integer) On Error Resume Next Set...
  19. danvlas

    Can I use "for each" to loop through inactive forms?

    Just a slight enhancement to MajP's code: Public Sub test() On Error Resume Next Dim frm As AccessObject Dim ctrl As Access.Control Dim frmOpen as Form Dim blnClose As Boolean For Each frm In CurrentProject.AllForms Set frmOpen=Forms(frm.Name) blnClose=(Err.Number<>0)...
  20. danvlas

    Display Next Record in query if current record is locked

    If you open your recordset in Pessimistic locking mode, issuing rst.Edit when the record is already locked will generate an error. If the mode is 'Optimistic', you need to do both .Edit and .Update to check if the record is locked. Test the error code and try a rst.FindNext [pipe] Daniel...

Part and Inventory Search

Back
Top