UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Multiple Actions when Button is Pressed    
 
   
dbrune
post Aug 30 2004, 04:43 PM
Post #1

UtterAccess Member
Posts: 23



I have a problem that if fixed will simplify my DB file a lot. I have a form called "CreditFaciility" and when the LastName field on a subform called "subGuarantors" is double clicked I need to open the form "PersonGuarantor". This is working well. When the PersonGuarantor form open the user can enter information as needed. If the user has a new record they are adding the following should happen:

When the Pencil button is pressed, the "PersonBrowser" form should open up. From this form they should be able to Press the "Select" button to select a person or press the "New" button to enter a new person. If Select is pressed the appliable IDs should be entered into the "PersonGuarantor" form.

It does not seem very complicated but because I am a code rookie, I have no idea how to accomplish this.

Any help someone could provide would be GREATLY appreciated.

Thanks!
Go to the top of the page
 
+
dbrune
post Aug 31 2004, 01:23 PM
Post #2

UtterAccess Member
Posts: 23



I am trying to repost this due to lack of response. Can anyone help me with this?
Go to the top of the page
 
+
Dom DXecutioner
post Aug 31 2004, 02:00 PM
Post #3

UtterAccess Ruler
Posts: 1,155
From: California



Reposting will definately not increase your chances of a response, if anything it might decrease it. Plus, cross-posting, and reposting are now allowed here at UA. Unfortunately, i was unable to find the form "CreditFaciility"
Go to the top of the page
 
+
Fletch
post Aug 31 2004, 02:11 PM
Post #4

UtterAccess Ruler
Posts: 2,329
From: Northern Virginia, USA



There were a few posts on another thread that went off course for a little bit and has some more info on this topic. That link is included for anyone following this response. . . (IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)

dbrune, I think I might have gotten it to work. I'm still having a hard time getting my hands around this database as it's somewhat complex. It seems like normalization may not have fully transpired in this database, though I'm not analyzing it that closely to be sure. At any rate, take a look at the attached database and tell me if that's what you want it to do or if you had something else in mind.

(IMG:http://www.utteraccess.com/forum/style_emoticons/default/frown.gif)

Edited by: babrandt on 08.31.04.
Go to the top of the page
 
+
dbrune
post Aug 31 2004, 05:16 PM
Post #5

UtterAccess Member
Posts: 23



The code you inserted is working better now. Couple things I am looking for:

1. On the PersonGuarantor form when the Pencil Button is pressed can you make it so the form opens to the PersonID from the PersonGuarantor screen
2. If there is no record on the PersonGuarantor screen (the user wants to add a new one) then when the Pencil button is pressed, the Person form should open instead of the PersonBrowser.

Thanks
Go to the top of the page
 
+
Fletch
post Sep 1 2004, 07:48 AM
Post #6

UtterAccess Ruler
Posts: 2,329
From: Northern Virginia, USA



I think this meets your specifications
CODE
Private Sub OpenPersonAddGuarantor_Click()
    
If Not IsNull(Me.PersonID) Then
    DoCmd.OpenForm "PersonBrowser", , , "[PersonID]=" & Me.PersonID, , acDialog
Else
    DoCmd.OpenForm "Person", , , , , acDialog
End If
    
End Sub

However, not sure of the purpose of opening the Person form in your #2 spec. It will do that, but I'm guessing you want something more, like a means to select a person from this list and then add this to the PersonGuarantor form or something like that, but see if the above code does what you want.
Go to the top of the page
 
+
dbrune
post Sep 1 2004, 01:49 PM
Post #7

UtterAccess Member
Posts: 23



That worked great. thanks

I had to reverse the OpenForm lines but it is working the way I need it to. The only other thing on this form would be when the form is closed so in the On Close I need the Product form to refresh or the SubGuarantors subform to refresh so it shows the changes.

Any idea how to make that happen?
Go to the top of the page
 
+
Fletch
post Sep 1 2004, 01:55 PM
Post #8

UtterAccess Ruler
Posts: 2,329
From: Northern Virginia, USA



Try
Forms("Product").subGuarantors.Form.Requery
in the Close event.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 03:36 PM