Intuit Financial Community: Determining Coupling status using VBA - Intuit Financial Community

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Determining Coupling status using VBA

#1 User is offline   Gerry-W Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 20-January 11

Posted 20 January 2011 - 03:02 PM

Hi Everyone,


I am doing a project for work and I am working on setting up an automated spreadsheet for T1 season. I am updating certain client information to match our time and billing database.

I have been able to successfully populate data in a single return as well as a coupled return.

However I cannot tell if the return is coupled or not, if I manually type in the a file name that I know is for a coupled return then I can update information.

I would like to know which fields dictate coupling status.



Thanks for your help - great product!

Gerry
0

#2 User is offline   Gerry-W Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 20-January 11

Posted 21 January 2011 - 03:33 PM

I think I have it figured out!

If the form for the spouses T1 results in an error, then there is no coupled spouse.

T1FileObj.Client.FormCount("spouse.T1")

Please let me know if there are any other fields that you can advise me about.

Thanks in advance.

Gerry
0

#3 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 494
  • Joined: 02-November 02
  • Location:Peterborough

Posted 21 January 2011 - 04:53 PM

Hi Gerry. I've tried your suggestion in a script I've been working but I keep getting an "invalid form name" error. I would assume this line is supposed to return an integer answer but it doesn't seem to do that for me. Is there something I'm missing?

Thanks
0

#4 User is offline   Gerry-W Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 20-January 11

Posted 21 January 2011 - 05:58 PM

View Postdunner, on 21 January 2011 - 11:53 AM, said:

Hi Gerry. I've tried your suggestion in a script I've been working but I keep getting an "invalid form name" error. I would assume this line is supposed to return an integer answer but it doesn't seem to do that for me. Is there something I'm missing?

Thanks


This is what I used, the T1Client is set, sorry I should have shown that above:

On Error GoTo NoSpouse
'Get the client object of the file
    Set T1Client = T1FileObj.Client
        T1Client.FormCount("spouse.T1") = T1Client.FormCount("spouse.T1")




0

#5 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 494
  • Joined: 02-November 02
  • Location:Peterborough

Posted 21 January 2011 - 07:48 PM

Thanks Gerry. I had already set the object but am still getting the error msg. I'll play around with for a while.

Thanks
0

#6 User is offline   Gerry-W Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 20-January 11

Posted 21 January 2011 - 09:12 PM

I swear this was working earlier today....

It isn't working now!
0

#7 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 494
  • Joined: 02-November 02
  • Location:Peterborough

Posted 21 January 2011 - 09:45 PM

Sorry. I didn't mean to jinx you! :D

Hope you can get it back.
0

#8 User is offline   Gerry-W Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 20-January 11

Posted 21 January 2011 - 09:50 PM

Ok... another approach (although I wish the powers that be at intuit could sign in ;) )

If you search any field that would be automatically created - eg a tax caclulation field, and the result is zero, the spouse is not coupled or does not exist.

eg. .client.field("spouse.line300") for the client it is 10,382, if no spouse exists it is 0. however this is problematic since the basic amount may be nil in some cases.

However the there is a .spouse.field available as well... unfortunately any time I try... no matter what I try I cannot get that to do anything but a runtime error.

The .client.addspouse.field works, but if the spouse does not exist it adds a coupled return - Which is great in my case since I used that field (.client.addspouse) to generate 200 dummy returns to practice with.

Unfortunately I am at a loss - there should be a simple solution, but I cannot find one, so I will have to find a form field that I am sure no one would ever overwrite and use that to tell if the spouse file.
0

#9 User is offline   Gerry-W Icon

  • New Member
  • Pip
  • Group: Members
  • Posts: 9
  • Joined: 20-January 11

Posted 21 January 2011 - 10:05 PM

So far the best field to determine if the spouse exists is client.field["spouse.t1info.b[10]"]. This is the marital status field if the spouse does not exist it is 0, which is not one of the other choices.

This may be the best approach. But I am all ears to any other suggestions! ;)

Have a great weekend.

Gerry
0

#10 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 494
  • Joined: 02-November 02
  • Location:Peterborough

Posted 21 January 2011 - 10:06 PM

Here's how I've checked for the existence of a spouse's tax return

If ((ThisClient.Field("t1info.b[10]") = 1 Or ThisClient.Field("t1info.b[10]") = 2) And _
ThisClient.Field("spouse.t1.s[1]") <> "") Then

This checks to see if the client is married or common-law and then the last part checks to see if there is something in the field for the spouse's first name on the T1. There wouldn't (as far as I can think) be a case where the spouse would have a return but no first name completed.

Hope that works for you.

Kevin
0

#11 Guest_snowplowguy_*

  • Group: Guests

Posted 21 January 2011 - 10:59 PM

Could you do anything with T1Info.s[21] ?

This is the SpouseSIN which comes from the area on the info screen that Profile populates if the return is coupled.
0

#12 User is offline   dunner Icon

  • Senior Member
  • PipPipPip
  • Group: Members
  • Posts: 494
  • Joined: 02-November 02
  • Location:Peterborough

Posted 21 January 2011 - 11:20 PM

I don't think that one will work, SPG. You can fill that area in without actually doing the tax return for the spouse.
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users