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...
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...
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
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...
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...
...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 which stores:
Select Itm.UPC, Sto.Rank, Sto.Store
From tblItem As ITM
Inner Join tblStore As STO On ITM.RANK = STO.Rank
Order By...
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...
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
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...
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
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...
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
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...
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...
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)...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.