closing a form (1 Viewer)

soundsfishy

Registered User.
Local time
Tomorrow, 04:11
Joined
Sep 25, 2002
Messages
174
I have a search form and when the user click the name in the results, I need to form to close. I cant seem to make the search form close after frmProposerMain is opened. What am i missing!

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmProposerMain"

stLinkCriteria = "[ProposerID]=" & Me![lstResults]
DoCmd.Openform stDocName, , , stLinkCriteria

Me![lstResults] = ""
DoCmd.CLOSE acForm, "frmSearchPerson"
 

dgm

Registered User.
Local time
Tomorrow, 04:11
Joined
Sep 5, 2002
Messages
146
Nothing that i can see, unless u spelt frmSearchPerson wrong ...

What if u try closing the form before u open the other one?

Code:
Dim stDocName As String 
Dim stLinkCriteria As String 

stDocName = "frmProposerMain" 

stLinkCriteria = "[ProposerID]=" & Me![lstResults] 

Me![lstResults] = "" 
DoCmd.CLOSE acForm, "frmSearchPerson"

DoCmd.Openform stDocName, , , stLinkCriteria
 

soundsfishy

Registered User.
Local time
Tomorrow, 04:11
Joined
Sep 25, 2002
Messages
174
Yep!!! it did spell it wrong..dam dislexia!..hehe
It should have been frmSearchPeople..

Dont you hate when its something simple and obvious.


Thanks
 
Last edited:

dgm

Registered User.
Local time
Tomorrow, 04:11
Joined
Sep 5, 2002
Messages
146
Always a pleasure to help a fellow Aussie...

Even if u are from Melbourne! :D
 

soundsfishy

Registered User.
Local time
Tomorrow, 04:11
Joined
Sep 25, 2002
Messages
174
Us Melbournians are a bit slow on Modays!...probably from all the grog we comsume on Fridays
 

Users who are viewing this thread

Top Bottom