ChrisPadgham 113 Posting Whiz

is this access or excel you are talking about

ChrisPadgham 113 Posting Whiz

See here for connection strings for mySQL databases
http://www.connectionstrings.com/mysql

create you own database with a name that is relevant to the application you are developing

ChrisPadgham 113 Posting Whiz
SELECT Materials.Item_Name, Proj_Mat.qty FROM Materials, Proj_Mat WHERE 
Materials.Item_Code=Proj_Mat.Item_Code AND Proj_Mat.Proj_Id=CurrentProjId

CurrentProjId is obviously the project you wish to report on

ChrisPadgham 113 Posting Whiz

what technical documentation do you have on the gateway

ChrisPadgham 113 Posting Whiz

please start your own thread in the appropriate forum

ChrisPadgham 113 Posting Whiz

the forum is about solving problems that you are experiencing. Do your design and if you have something you can resolve, post it and someone will assist you.

ChrisPadgham 113 Posting Whiz

This is a duplicate is it not.

ChrisPadgham 113 Posting Whiz

I don't think a listview control is what you want. I think it would look more like a normal question screen if you had an array of radio buttons. On your form, place one radio button, then copy and paste it, VB will ask if you want to create a control array, answer yes. then keep pasting until you have the desired number of radio buttons.

When you retrieve a record from the database populate the captions of the radio buttons.

Place some code under the click event of the control array to check if the user has selected the correct answer

ChrisPadgham 113 Posting Whiz

so where is the code that establishes the adodc2 recordset and what is the error you are receiving

ChrisPadgham 113 Posting Whiz

in the first instance create a control array of text boxes, put one text box on the form, copy and paste it, VB will ask if you want to create a control array to which you answer Yes. Then past the remaining 13 text boxes.

randomise
for i = 1 to 14
  textboxNo = int(rnd()*14)
  do until textbox(textboxNo).text = ""
     textboxNo = int(rnd()*14)
  loop
  textbox(TextboxNo).text = i
next i
ChrisPadgham 113 Posting Whiz

well I can't see anything referring to an object Employee ID but I am thinking you probably need to move line 18 above line 11. not much point in trying to use drTrans until you have assigned it a value.

ChrisPadgham 113 Posting Whiz

have you checked out if you can get the data via a web service in XML, it will be far simpler and more robust to process it that way.

ChrisPadgham 113 Posting Whiz

Try this

myForm1.setfocus
unload ME
ChrisPadgham 113 Posting Whiz

see an example here

http://www.codeproject.com/Articles/24234/ActiveX-Control-to-Use-DataGrid-in-VB6

once you are underway with your code, if you have a specific problem post it and someone will help you.

ChrisPadgham 113 Posting Whiz

I think you should stay with a traditional relational design if you are planning to implement in a relational database. see below the table to hold bar visits.

barsVisited (visitId, PersonId, BarId, DateVisited)

the difficuly with your design is that it does not allow questions like
"how may people have visited bar X?" or "how many bars did I visit on 23/2/12?" to be answered easily

ChrisPadgham 113 Posting Whiz

datediff returns a number, ie number of days, number of hours, number seconds depending on the first parameter. so if you want the number of hours between the two the call looks like

noHours = datediff("h",[Work Start Time],[Work End Time])

or in SQL

noHours:datediff("h",[Work Start Time],[Work End Time])
ChrisPadgham 113 Posting Whiz

how does someone log in? are you displaying a login form and if so when? if it is in the form load event before you call CreateIdFolder ensure that it is displayed as modal otherwise the form load event will continue processing and not wait for the user to log in.

ChrisPadgham 113 Posting Whiz

Rather than bothering with a log in screen you may like to authenticate off the windows login

Function getUserName()
Dim wshNet as object
Dim sUser as string

set wshNet = CreateObject("WScript.Network")
sUser = wshNet.UserName
set wshNet = nothing
getUserName = sUser
End Function

you can then query a database table of usernames and privileges to determine if this user has admin rights.

ChrisPadgham 113 Posting Whiz

use the datediff function, inspite of its name it handles times as well as dates.

ChrisPadgham 113 Posting Whiz

This forum does not write you assignments for you. Have a go yourself, if you have a piece of code that you cannot get to work post it and someone will help you debug it.

ChrisPadgham 113 Posting Whiz

if you double click on the button it will open a code window, this is where you write the code to calculate the price. If you don't know how to write Visual Basic code here is a resource you could look at

http://visualbasic.freetutes.com/learn-vb6/

ChrisPadgham 113 Posting Whiz

the scanners I have used simulate keyboard entry. That is, what is scanned appears as if the user has typed it on the keyboard. set focus on a textbox then scan and the data from the scanner will be placed in the text box. it is usually terminated with a CR so place some code in the Lost_Focus event to handle the data.

ChrisPadgham 113 Posting Whiz

at line 24 you should not have VAL function this is to convert a string to a number and room price is an integer. if anthing you shoul probably use Cstr

ChrisPadgham 113 Posting Whiz

see the attached ER diagram, you will obviously need to add more fields to make it complete

ChrisPadgham 113 Posting Whiz

that is the simplest way

ChrisPadgham 113 Posting Whiz

since you have the code structured like it is you will want to place the same piece of code in a number of places, accordingly, it is probably better to put it in a function, line 40 becomes

lblSalOutput.Text = CStr(assistant + addLoading)

then your addLoading function looks like

private function addLoading
    dim Loading as long
    Loading = 0
    if chkMast then Loading = Loading + masters
    if chkDoct then Loading = Loading + doctorate
    addLoading = Loading
end function

Note also integers can only hold up to 32,767 you should use long.

ChrisPadgham 113 Posting Whiz

try

if instr(mainPath, "xx") > 0 then msgbox "mainPath containsxx"
ChrisPadgham 113 Posting Whiz

What are you trying to compare to "xx", are you sure you don't mean

If mainPath.Substring(0, 2) = "xx" Then
ChrisPadgham 113 Posting Whiz

in itunesu look for stanford university lectures by Paul Hegarty on iPhone development, this is a good start

ChrisPadgham 113 Posting Whiz

type Ctrl-Alt-Del and select task manager, see what else is running and how much memory it is consuming

ChrisPadgham 113 Posting Whiz

doesn't sound like a VB.Net problem, I suggest you look at your system config and what else you are running on the PC

ChrisPadgham 113 Posting Whiz

Please ask a specific question. what code have you developed so far?

ChrisPadgham 113 Posting Whiz

please format your code

ChrisPadgham 113 Posting Whiz

If you have not experience with programming, can I suggest you learn the language first on a simpler problem and work up to this

ChrisPadgham 113 Posting Whiz

I think NO, for a start you would probably be violating copyright.

ChrisPadgham 113 Posting Whiz

Doesn't Enabled=False do that

ChrisPadgham 113 Posting Whiz

you could set the visible property of the textbox to False or probably more simply just declare a local variable to hold the string

dim FileToOpen as String
FileToOpen = OpenFileDialog1.FileName
Aleksej commented: You also helped me. Thx +1
ChrisPadgham 113 Posting Whiz

The problem with WIA is a number of scanners don't fully support it (or don't support it at all) I used a product called EZTwain on one site where I had this problem which you might like to check out. You can download a trial version for free and the full version is only a few hundred dollars I think.

ChrisPadgham 113 Posting Whiz

you need to include the join on the user table, something like

AND a.userId=u.UserId
ChrisPadgham 113 Posting Whiz

as jx_man said you need to hold the amount remaining somewhere else, ie a different table. create a stock table that holds the remaining stock for each item. you need to read this for the item concerned, subtract the amount sold and update it.

ChrisPadgham 113 Posting Whiz

you need to check whether the text box contains anything before you attempt to open it. After line 6 put an if statement

if textbox1.text <> "" then

and after line 9

end if
ChrisPadgham 113 Posting Whiz

can you format your code please

ChrisPadgham 113 Posting Whiz

we prefer specific questions here. If you have trouble with some code please post it and we will have a look

ChrisPadgham 113 Posting Whiz

Approach to what, are you loading the rows into a database?

ChrisPadgham 113 Posting Whiz

Also TotalCost should be a module level variable declaration. By declaring it in each subroutine, it is created when the subroutine is invoked and destroyed when the subroutine terminates making it useless. Have one

dim TotalCost as Decimal

in the declarations section of the module at the top

ChrisPadgham 113 Posting Whiz
for i = 1 to 6
   OrderMenu(i).ItemName = ""
   OrderMenu(i).ItemCost = 0
next i
ChrisPadgham 113 Posting Whiz

Can I suggest you give it an alias

SELECT CONCAT( Table_Name, '.', Column_Name ) AS TableCol FROM

then use TableCol in your code.

ChrisPadgham 113 Posting Whiz

seems awefully hard work. Why don't you just create a new table with the key field as unique and append the existing table, the new table will not have any duplicates

ChrisPadgham 113 Posting Whiz

so what is the problem, have you set a break point in the code and stepped through to see whether it is entering the code and if so what it is doing

ChrisPadgham 113 Posting Whiz

oops left the number of characters of the left function try this

If Not Entry.Deleted And Command1.item(Index).caption = left$(Entry.FörNamn,1)