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?

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 ?

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

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.



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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.