View Rate Pop Up Form

josros60

Well-known Member
Joined
Jun 27, 2010
Messages
784
Office Version
  1. 365
Hi,

i have a view rate form, so when they select a company that doesn't have a rate to display a custom message it works fine the only problem is that when i open the form it display the message first because i know the first company has not rate but it hasn't even open the form after works fine only display message if company has no rate,

how can make it not to display the message when the forms open, just to display after they have select a company if has not rate.

here it's the code:

Code:
Private Sub Form_Current()
 Call sShowToolTip(Me)
 With Me![Rate].Form
       .Visible = (.RecordsetClone.RecordCount > 0)
     
                 End With
           FindRate = Company
              Call sShowToolTip(Me)
   If Me![Rate].Form.Visible = False Then
      Me!lblRate.Visible = False
       strMsg = "This Company has no rates to display. Please select another Company "
        intStyle = vbOKOnly
        strTitle = "Looking at rates"
        MsgBox strMsg, intStyle, strTi
   Else
   Me!lblRate.Visible = True
   
End If
End Sub
thank you
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
If the only way to select a new record is some record selector (combo box or something) you could move this code to the After Update event of that record selector. That won't work if you allow the user to scroll through the records with the form's Navigation Buttons set to True. So, it really depends on how you have your record navigation set up.

hth,

Rich
 
Upvote 0
Thank you very much.

I moved it to after update event and it works perfectly.

thanks again.
 
Upvote 0

Forum statistics

Threads
1,221,814
Messages
6,162,132
Members
451,743
Latest member
matt3388

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top