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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access hangs..?

Status
Not open for further replies.

Kujen

Technical User
Oct 13, 2007
57
SE
Hi all,

On my form I have a Combobox1_AfterUpdate() that shows records and with some summary fields :
...
Me.Txt1 = DSum"[Field1]", "MyTbl", "[Field2] ='" & Combobox1 & "'"
...

Combobox1 is populated with 'Field2' from 'MyTbl'.
'MyTbl' is a linked table from SQL-server.

For some reason Access takes up to 100 x the time or 'hangs' when I use this code.
But only If choose records from Combobox1, as a filter, that are updated by SQL-server.

I have no problem with other not updated records.
If I delete the above code then I can run the rest of the code.

I'm logged in as 'sa' (system.admin) on SQL-server.

The difference between not updated and updated is that
not updated looks like: 'Name '
and updated looks like: 'Name'

Not updated records have spaces after visible characters.

Any idea why records without spaces is a problem?

Kent J.
 
Using Domain Aggregate function (DCount, DSum, etc.) on a SQL Server connection will cause the entire table data to need to be transferred across the network to the mdb file to do the aggregates.

Use a stored procedure with a function ON SQL Server itself for something of this nature. Your speed will improve drastically.


Bob Larson
A2K,A2K3,A2K7,SQL Server 2000/2005,Crystal Reports 10/XI,VB6, WinXP, and Vista
Free Quick Tutorials and Samples:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top