I am using the "On Current" and "After Update" events on a form to display select fields, depending on what type of transfer the user selects. This works fine up until I go to add a new record, at that point I get a "Run-Time Error '13' Type Mismatch" error message. I've looked into this a little bit and have not been able to get past it. I tried following the advice given in the FAQ but that didn't seem to help. Any ideas on what I'm doing wrong?
I'm running Microsoft Access 2000 (SP-3). When the error message pops up and I go to debug it points to the very first line of the code (the one that starts with Me!cboLiveAuctionDate.Visible).
Thanks for the help, let me know if I can tell you anything else to be of assistance.
-Steve
I'm running Microsoft Access 2000 (SP-3). When the error message pops up and I go to debug it points to the very first line of the code (the one that starts with Me!cboLiveAuctionDate.Visible).
Code:
Private Sub doFieldsVisibility()
'Make visible the items for transfers to Live Auctions
Me!cboLiveAuctionDate.Visible = (Me!TransferType = "Live Auction")
Me!LiveAuctionDate_Label.Visible = (Me!TransferType = "Live Auction")
'Make visible the items for transfer to other agencies
Me!cboToAgency.Visible = (Me!TransferType = "Agency")
Me!ToAgency_Label.Visible = (Me!TransferType = "Agency")
'Make visible the items for transfers to Internet Sales)
Me!cboMiBidLotNum.Visible = (Me!TransferType = "Internet")
Me!MiBidLotNum_Label.Visible = (Me!TransferType = "Internet")
Me!txtOnlineDate.Visible = (Me!TransferType = "Internet")
Me!OnlineDate_Label.Visible = (Me!TransferType = "Internet")
Me!txtAuctionCloseDate.Visible = (Me!TransferType = "Internet")
Me!AuctionCloseDate_Label.Visible = (Me!TransferType = "Internet")
'Make visible the items for transfers to Sealed Bid
Me!cboSealedBidNum.Visible = (Me!TransferType = "Sealed Bid")
Me!SealedBidNum_Label.Visible = (Me!TransferType = "Sealed Bid")
Me!cboWinningBidder.Visible = (Me!TransferType = "Sealed Bid")
Me!WinningBidder_Label.Visible = (Me!TransferType = "Sealed Bid")
Me!txtDescription.Visible = (Me!TransferType = "Sealed Bid")
Me!Description_Label.Visible = (Me!TransferType = "Sealed Bid")
Me!txtWinningAmount.Visible = (Me!TransferType = "Sealed Bid")
Me!WinningAmount_Label.Visible = (Me!TransferType = "Sealed Bid")
End Sub
Private Sub Form_Current()
doFieldsVisibility
End Sub
Private Sub TransferType_AfterUpdate()
doFieldsVisibility
End Sub
Thanks for the help, let me know if I can tell you anything else to be of assistance.
-Steve