»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 03-12-2004, 01:03 AM   #1 (permalink)
Registered User
 
muno's Avatar
 
Join Date: Oct 2001
Location: Finland
Posts: 3,838
muno is on a distinguished road
Send a message via Yahoo to muno
VB6 & Access2000

Hello.
I need to create an application that gets data from access database (or puts data there, too)

I've created a project, and a database. Linked the database to project and can succesfully get whatever database has to vb6.
However, I need to be able to have internal calculations in access.
The problem is as follows:

There's a total number of cars. Eg. 20
There's available number of cars. Eg. 20 (currently)
In the vb6 form, there's a field where you can enter how many cars you want. I need to be able to do that, so that access automatically reduces the number of available cars by the number the user has entered in the vb6 form.

How would I do that?
Also, rather than having to use the stupid looking database control in my app, I would like to use a combobox to choose whatever car model I please, and the form would get the data from the database. The data object looks silly and is stupid to use.

HELP!

//edit:
Alternatively I could do it like this.
I have a textbox in vb, which is linked to text field in access.
The textbox contains names of people that want to have the cars, it's a multiline textbox, in which every name has it's own line.
If I could calculate the number of lines within vb, it would be possible to say how many cars are available.

Like this: availablecars = totalcars - NumberOfRowsInReserversTextBox

//edit2:
And why does my application, if I click somewhere in the form except textbox start ignoring the mouse. If I click somewhere besides textbox, I can't click anywhere anymore.

//edit3:
Ok, I now succesfully have a line counter, which in return tells me the correct amount of reservers.
Now the only problem that remains is that why does my application have the problems with the mouse


Last edited by muno; 03-12-2004 at 08:29 AM.
muno is offline   Reply With Quote
Old 03-12-2004, 10:52 AM   #2 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
Hmm odd problem with the text box

You're using VB6, have you installed the latest SP's?
http://www.microsoft.com/downloads/d...DisplayLang=en

Believe SP5 is the latest one.
Sounds like a bug in the text box control.

I agree the database control is really cheesy, I've never used it myself... but well.. I'm a geek so I code buttons manually
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 03-12-2004, 12:06 PM   #3 (permalink)
Registered User
 
muno's Avatar
 
Join Date: Oct 2001
Location: Finland
Posts: 3,838
muno is on a distinguished road
Send a message via Yahoo to muno
Yeah, I updated to sp5, the out-of-the-box vb doesn't support access2k databases.

The textbox works just fine now. The only problem I'm having is that it hangs whenever I click somewhere that is not a textbox.
If I click the database controls, it will hang the mouse, if I click a label box, it will hang the mouse. I mean the mouse moves all right, but it just isn't usable anymore, except for the database buttons.

//edit: Oh!
I made a command button, and text box. The command button supposedly sends feedback, like this->
You type whatever you want to say, and the command button does this->
ProcID = Shell("net send ipaddress txtFeedback.Text")

However, it doesn't parse what's in the textbox, it just sends a message with the text 'txtFeedback.Text'. Is it even possible to do what I'm trying to do?

Usability isn't an issue here, I'm doing this for school. So it really doesn't matter if it's good in the long run or not

Last edited by muno; 03-12-2004 at 12:09 PM.
muno is offline   Reply With Quote
Old 03-12-2004, 12:44 PM   #4 (permalink)
Registered User
 
Join Date: Oct 2001
Location: TOO close to Wash DC
Posts: 7,956
vass0922 is on a distinguished road
try ("net send ipaddress " & txtFeedBack.Text)


Is the access DB on a network server, or local?
Not sure why its hanging, the only thing I can figure is if you have some code in the _OnClick() events of those controls
If you don't have any custom code for those controls make sure they're removed from the code so it doesn't try to execute them.

How are you getting the IP address to send?
Is it in another text box?

If so you'll have to do something like

("net send " & ipaddress.text & " " & txtFeedback.text")
__________________
<< Insert exceedingly large and overly verbose message of how 1337 you are here including full specs of every vehicle you've ever driven and PC you've owned >>
vass0922 is offline   Reply With Quote
Old 03-12-2004, 02:27 PM   #5 (permalink)
Registered User
 
muno's Avatar
 
Join Date: Oct 2001
Location: Finland
Posts: 3,838
muno is on a distinguished road
Send a message via Yahoo to muno
Yeah! It was picky, there needed to be a space after the ipaddress for it to work.

The access db is local, in the same directory as the project.
It's a static ip address, I thought that the application owner (me) has the server setup with a static ipaddress, and people using the form will only need to send feedback to that address.

Can something in the form properties make it hang? It seems that if I click on it, the mouse refuses to acknowledge my commands anymore.

//edit: If I switch programs, eg. press some other program in taskbar, and then return to my program, the mouse works again.
This is frustrating

//edit2:
I'm deeply sorry. It was just my computer that was bad bad bad. I rebooted, and it doesn't hang my mouse anymore. Perhaps it was some buggy code I did, and executed which made my mouse bug and stuff.

Thanks ALOT vass for your help here.

Last edited by muno; 03-12-2004 at 03:01 PM.
muno is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 02:04 PM.