954,535 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Can anyone help?

Greetings!
i need help. Does anyone know how to set record or primary key properties to a text box on a form in VB6 through the code?

kalitherenegade
Newbie Poster
4 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

I am sorry, but I don't really understand your statement. What is a 'record' property ? And 'Primary key' property applies to a field in a database table, not to a text box. Do you mean the field whose data is being shown in the text box ?

aparnesh
Junior Poster
194 posts since Jul 2005
Reputation Points: 20
Solved Threads: 10
 

U can only set the primary key with the database not in the code.

jacsme
Newbie Poster
4 posts since May 2007
Reputation Points: 10
Solved Threads: 0
 

I'm going to assume you are an Access programmer. I'm afraid VB won't do this stuff for you, you have to do it yourself. Having said that it is far more powerful and robust than Access and if you get it right will work much better.

Cheers

D

davidcairns
Junior Poster
114 posts since Feb 2007
Reputation Points: 12
Solved Threads: 8
 

Hey thanks for the response but i managed to solve the record key problem. i had to set in in access and then put an error handler in VB such that when two records onflict the system should prompt you to enter a new ID. Hope you know what i mean but anyway thanks and take care.

kalitherenegade
Newbie Poster
4 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You