Sep 29 2009

Comment by Seth Spearman on MS Access VB call to Lib “kernel32” fails to stop a process

Phil have you stepped through it? What happens?
Sep 29 2009

Comment by Seth Spearman on Access: Canceling Report generation causes error 2501

One last thing...ECHO False PREVENTS screen when I say you have to be careful I mean you have to absolutely ensure that Echo is set to True at some point. You should only use Echo if your code or macros are doing a lot of things that will cause the screen to jump and flash etc.
Sep 29 2009

Answer by Seth Spearman for Access: Canceling Report generation causes error 2501

Ditto to Phillipe's answer. you didn't give us the whole procedures but you need to do something like this...

Sub MyButton_Click
On Error Goto myError

DoCmd.OpenReport vBerichtName, nAnsicht

   Exit Sub

   If Err.number = 2501 then goto myExit
   msgbox err.description
   goto myExit

End Sub

This is a common error but you can catch it like any other error and ignore it if is 2501.

Sep 27 2009

Answer by Seth Spearman for Using Data Adapter to save in Access db, c#

This article might help


Sep 27 2009

Comment by Seth Spearman on Best practices in Access programming

Two of my all time favorite books. I had every edition of the first one.
Sep 24 2009

get object out of telerik radcontrol for winforms binding


I hope that someone can help me with an issue related to binding a bindable collection class to one of the Winforms Telerik list controls.

If you bind to a plain ole windows list control like this...

dim list as new listBox

with list
    .DataSource=myCollectionClass  'this contains a collection of widgets.
end with

I can then get a widget out of the list by doing this...

Dim myWidget as Widget=ctype(list.Items(0),Widget)

If you do the exact same code with for example a Telerik RadListBox (same example as above) but change line one to be

Dim list as new RadListBox.

With RadControls it seems you cannot cast to the Object type directly. Whenever I try this I get the following error...

Unable to cast object of type 'Telerik.WinControls.UI.RadListBoxItem' 
to type 'Widget'.

Can someone at the least confirm that this is a known limitation of Telerik RadControls for Winforms or let me know the proper way to do it.

Thanks. Any help will be appreciated. Any thoughts?


Sep 23 2009

Tweets made on 2009-09-23

Powered by Twitter Tools.

Sep 23 2009

Tweets made on 2009-09-23

Powered by Twitter Tools.

Sep 18 2009

Is it true that I can still use Linq to SQL in design time even if you are targeting .net 2 in your application?


Someone recently said that I can use Linq to SQL in my application even if I am targeting the .net 2 framework. Is that true?

How does that work? How do you setup your references? Any gotchas I need to be concerned about? Is there some special way to set that up?



Sep 16 2009

Answer by Seth Spearman for ms access reports and queries

To solve this problem in the past I would use a big temp table with fields like level1, level2, level3, etc. Level1, of course would where you would put the "root" objects...that is, objects that don't have a parent.

Then you create a function that calls itself recursively and fills out the table into all of the levels. It is sort of yucky but it works.

It has been a while since I did that ... I will see if I can find the function somewhere but I doubt I will be able to get my hands on it.

But I bet someone else has that code more available. Anyone? Anyone?


PS...BOMs display great in a treeview control.