"Totti" <sa******************@gmail.comwrote in message
news:f3**********************************@v22g2000 pro.googlegroups.com...
Hi everybody,
VB.6 - I am working on a project that is actually a college
application, this is the first time i use VB and i am using VB-6 some
of the reader who tried to help me in the past told me that this is
not the proper place to be since it .NET but actually my problems are
general and thats why i am posting again.
from the MDI form i call lets say the student form, which is related
to an access file where all the DB is held, the form takes the values
it is asked to, but always for the student ID which is the first
column, the first row is empty, eventhough if you open the access file
the value is there, but on the form it doesnt show, while all the
other values show, and therefore i get an error message about an empty
field in my DB. any thoughts what would be the cause behind it?
2nd question is, if i want to put 2 buttons 2 jump from the one row of
the DB shown to the other, say next and previous, how would i do that?
eventhough the mouse click does the job, but in case i want to hide
the data table from the form i want a previous---next option to loop
the Data
3rd question, how can i make a text box, "show only" that you can not
click on it neither edit it?
Thank you all in advance.
Hi Totti:
I will try to help you out here. I'm still a newbie but I beleive I have
gone through your headaches as well :)
Question 1:
Is the StudentID auto-increment in the Access Table ? Did you add that
recrod from within .net?
In .net an Access table's AutoIncrement field is not automatically populated
back. You have to use something called @@Identity - but i have never gotten
this to work - so what I do is I just re-query my table at the end of an add
and get the id.
Someone else here might be able to help you with that.
My way is not the "Right" way of doing it - but it works and its such a
small table I dont mind making a couple trips to the DB.
SQL Express does it for you to get the new ID it assigned at the DB level.
I use that simple way when I use an access table for stuff.
Question 2: Take a look at the binding source. <
bindingsource.movenext() / movelast .. (written in notepad )
The binding source can be used to go up and down the records.
Question 3:
Textboxes have 2 options you can use.
Enabled ( which grey's the control )
or take a look at "ReadOnly"...this does not grey the control but makes it
so it is not editable.
-Not every control has a 'readonly' property.
Hope that helps.
Miro