Rabu, 28 September 2011

[MS_AccessPros] Opening a form as filter from code

 

After Updating HomeInfoID on the Listing form I would like it to
-check to see if this HomeInfoID has been a former listing and
-then open the Search_HomeInfo form
-enter the HomeInfoID into the cboAddress.Column(0) box which is an unbound box.

In the Search_HomeInfo form upon updating the cboAddress unbound box the form is populated. So I need to make the unbound cboAddress update.

HomeInfoIDHeader is a noncombobox whose control source is HomeInfoID.

The message I am currently getting:
Run-time error 451 "Property let procedure not defined and property get procedure did not return an object" On debugging the line that is highlighted is the Forms!Search_homeInfo... line. Code is below.

Thanks!
Connie

'Open "Search_HomeInfo" form with message if there is previous listing history and not a current listing
If Not IsNull(DLookup("HomeInfoID", "Listings", ("HomeInfoID = " & Me.HomeInfoIDHeader & " And (CurrentListing = 0)"))) Then
DoCmd.OpenForm "Search_HomeInfo"
Forms!Search_HomeInfo.cboAddress.Column(0) = Me.HomeInfoIDHeader
Msgbox "This property has previous history." & _
"Make sure you are not entering the same one"
End If

__._,_.___
Recent Activity:
MARKETPLACE

Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Tidak ada komentar:

Posting Komentar