show the item rating with stars....help

samy

Registered User.
Local time
Today, 10:15
Joined
Oct 15, 2005
Messages
16
Hi all

I have a rating table with the rate ID and title. Is there a way to represent the rate as stars image like this

rating_5.gif

rating_4.gif

rating_3.gif

rating_2.gif

rating_1.gif


instead of just showing the title of it.

i tried with this code

Select Case Me.RateID
Case 1
Me.Image0.Visible = True
Me.Image1.Visible = False
Me.Image2.Visible = False
Me.Image3.Visible = False
Case 2
Me.Image0.Visible = False
Me.Image1.Visible = True
Me.Image2.Visible = False
Me.Image3.Visible = False

Case 3
Me.Image0.Visible = False
Me.Image1.Visible = False
Me.Image2.Visible = True
Me.Image3.Visible = False
Case 4
Me.Image0.Visible = False
Me.Image1.Visible = False
Me.Image2.Visible = False
Me.Image3.Visible = True
End Select

but there is somthing wrong it dosnt change ?? correct me if im wrong please
 
Last edited:
ok its working now thanks ken :)

the mistake was in the spilling the rate id was rat loool

i fixed that and every thing is fine
 
Last edited:
Cool idea...

I'd like to see the thing work...
 
I agree, very cool.

But why would 1 star be excellent and 5 be terrible.

I guess I'm just used to seeing it in the reverse.

Gary
 
samy said:
hope it help :)
Your posted sample will not display the correct number of stars when the user scrolls through the records. You need to also call the code in the forms OnCurrent event. Also, you should move the code to one sub and call that sub in each event that you need to refresh the star count based on the value of the Rating ID. I have attached my revision to your sample.
 

Attachments

ghudson
your code is what I am looking for so organized and do the work correctly thanks man
 
samy said:
ghudson
your code is what I am looking for so organized and do the work correctly thanks man
You are welcome!
 
I was looking for something similar to this but I wanted it to work more like a web based star rating solution where you hover over the stars and it changes accordingly. Much like on some review sites. The code can probably be cleaned up but it works. Just click on the stars and it will bring up a new form where you can hover and change the stars. Click on the stars to close the form and save your change to the original form.
 

Attachments

Users who are viewing this thread

Back
Top Bottom