473,396 Members | 1,683 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1158

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christopher Brandsdal | last post by:
Hi! I have a delicatg problem.... I have made a registration form for adding my friends information in a database. The problem is that I want to connect the persons with companies in the same...
11
by: Taishi | last post by:
Andy, I am new to SQL. It was hard just to figure out how to install it. I know I am logged in as a Admin. in Windows. I have the little server box with the round circle on it in the bottom...
4
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
13
by: Manuel Lopez | last post by:
I have a puzzling form timer problem that I didn't experience prior to Access 2003 (though I'm not sure access 2003 is to blame). Here's the situation: a computer has two access 2003 databases on...
13
by: Daniel Walzenbach | last post by:
Hi, Imagine the following situation: I have an asp.net application which allows uploading files to a SQL Server 2000 database (Files are stored as type "images"). As a next step I would like to...
1
by: Brian Henry | last post by:
I am trying to make a custom user control that gets a list of users from our database and populates the list, its an owner drawn control also, the problem is, I placed the item onto a form and...
4
by: visionstate | last post by:
Hi there, I'm fairly new to access and the way it works and I have been building a relatively simple database. It is basically a database where staff members can search for what training they (or...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
12
by: Steve | last post by:
I have a database that raises an error when you try to open it and it doesn't open. Trying to open the database with the OpenDatabase method raises the same error. Trying to import any objects...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.