469,642 Members | 1,183 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,642 developers. It's quick & easy.

DataBase and form problem

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.
Nov 3 '08 #1
2 1094

"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

Nov 3 '08 #2
Totti,

What you are asking is all typicaly for VB6 as you use that..

In VB6 are recordsets used (can also in Net), but VB6 you cannot use the
ways .Net handles.

So you really whould ask this in a VB6 newsgroup by example
microsoft.public.vb.general.discussion

Cor

"Totti" <sa******************@gmail.comschreef in bericht
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.

Nov 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Christopher Brandsdal | last post: by
11 posts views Thread by Taishi | last post: by
1 post views Thread by Brian Henry | last post: by
4 posts views Thread by visionstate | last post: by
9 posts views Thread by Wayne Smith | last post: by
12 posts views Thread by Steve | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.