i made my project here so called "student profile". it runs properly and OK!
but i have a problem. i want to change picture everytime i change name...
can somebody share their code?
thanks in advance!
see SS!
Printable View
i made my project here so called "student profile". it runs properly and OK!
but i have a problem. i want to change picture everytime i change name...
can somebody share their code?
thanks in advance!
see SS!
How do you have the pictures stored? In a database? as files saved with a student id?
Try to give some more details like where you stored, when you want to change, etc.
If you are using filepath that was stored in a database, then write the code for displaying the picture from database, and call that function when you press back or next button..
Best wishes:)
yah sir, i connect it to database...
can you help me, how to code sir?
if studno.text = 12345 thenQuote:
Originally Posted by jhaps007
pic.image = path c:\image1
end
pre yung code para ganyan pero kailangan mo i lagay sa database yung image lagyan mo narin ng number para di mahirap tawagin yung pic
what do you have stored in the database? the path of file?
You say you connect to a database, but are the pictures you want to use stored in that database?Quote:
Originally Posted by jhaps007
I hope this will help you..:)Code:Private Sub cmdBack_Click()
Data1.Recordset.MovePrevious
LoadingPic 'sub
End Sub
Private Sub cmdNext_Click()
Data1.Recordset.MoveNext
LoadingPic 'sub
End Sub
Private Sub Form_Load()
'connecting the database
Data1.DatabaseName = App.Path & "\database.mdb"
Data1.RecordSource = "student"
Data1.Refresh
LoadingPic 'sub
End Sub
Private Sub LoadingPic()
'sub for displaying the picture from the database
Picture1.Picture = LoadPicture(Data1.Recordset.Fields("picture"))
End Sub
yes, sir...Quote:
Originally Posted by Hack
or do you have have any idea sir?
jhaps007,
Try to give as much as details that you can...:)
Then only we will be able to solve the problem...:)
In my post #8,
I had assumed that the fullpath of the picture file is stored in the database along with other fields(eg. Surname,FirstName,Course,Age,picture)
Then I wrote a function for displaying the picture.
Then called that function each time, when the record is changed.
I think, you understand my method...:)
What's this ...???Quote:
DTR TIME RECORDED SYSTEM??
here sir, try to test my source for you to understand...
download link
http://rapidshare.com/files/13922141...entProfile.rar
Sorry, you are using ADO. I am not much familiar with ADO but only with DAO...:)
You can use my technique(post #8) with some changes(I used DAO, so there will be some changes in ADO), in your program....
Don't worry... there any many experts and gurus in this forum who are experts in ADO.... Just wait for what they have to say..:)
One thing I want to say is...
You can include another field in your table(database) for storing the path of the picture file....
thanks sir for further explanations....Quote:
Originally Posted by akhileshbc
guys, who can help me here!
Use LoadPicture
thanks sir but i tried a lot...Quote:
Originally Posted by Zach_VB6
anyway sir, try to download my attachment here for you to understand...
hope you can help me.
thanks in advance!
If you have saved the pictures in the same folder with firstname as filename, then try this:
Use this line of code when you navigate through recordest(I mean when you click on Back button or Next button)..:)Code:Picture1.Picture = LoadPicture(app.path & "\" & txtFirstName.text & ".jpg")
-Good day pal :):wave:
Akhilesh