create an array of buttons that all respond to the same click event.
Assuming each button has a single letter on it, eg A, change line 20 to be
If Not Entry.Deleted And Command1.item(Index).caption = left$(Entry.FörNamn) Then
create an array of buttons that all respond to the same click event.
Assuming each button has a single letter on it, eg A, change line 20 to be
If Not Entry.Deleted And Command1.item(Index).caption = left$(Entry.FörNamn) Then
Can I suggest you look at MS Access in the first instance. It is a good starting point for learning about developing database applications. Whilst the programming is in VB not C# for a new comer it provides all you will need to develop your application.
so what do you want to achieve, when they click a letter it returns the names from the file that start with that letter?
you would put a method in the view controller for the view that contains the button and that is linked to the touch up inside event. In this piece of code set the hidden property of the button to YES and the value of the button to the text box.
The answer is still the same, once you have identified the offending entry
ListBox1.Items.RemoveAt(IndexOfSingleItem)
Read up on linked tables, you can link the tables from one database in the other then use an SQL INSERT statement in your VBA to insert the data.
Currentdb.Execute "INSERT INTO table_new (F1, F2, F3) SELECT F1, F2, F3 FROM table_old
try
SELECT Student.StudentNum, Student.FirstName, Student.LastName, Student.Initial, Event.Event, Event.EventDate, Transaction.Status
FROM (Student INNER JOIN Event ON Student.StudentNum = Event.StudentNum) INNER JOIN [Transaction] ON Student.StudentNum = Transaction.StudentNum;
if you are saying that the item is to be available in multiple but not necessarily all areas then you need to create a new table call ItemArea, for example.
ItemArea (ItemAreaId, AreaId, ItemId)
then change the relationship to insert this table between Item and Area in you model.
This appears to be generating HTML, where does Excel come into it.
your zip file appears to be corrupt
look on itunesU for iPhone programming by Paul Hegarty of Standford University. His on-line lectures are free and explain this well.
you can remove line8 by formating your date in line 7
IDS = "APCSO" & format$(now,"ddmmmyyyy") & idhand
is it because the class name and the instance name are the same.
how about
dim frmCustomers as New formCustomers
you could try the cursorChanged event
you need to concatenate the name to the string. The way you have it you are including the literal txtName.Text whereas you want the contents of txtName.text.
lblMessage.Text = "It looks like cloudy weather today, " & txtName.Text
you are in part thinking of this incorrectly. You are providing two services to your clients; the obvious one, providing your manpower billed on a time basis. You are also providing your availability (or response time if you like), that is your customers have developed an expectation that if they contact you for support that you will respond in a certain time. This expectation is potentially costing you money because there may be other opportunities that arise that you will not be able to take because of these arrangements. So, let's say they give you no work and you have turned down other opportunities in case they needed you, you have lost both ways.
You need to consider a annual support agreement with your clients where they pay a certain amount to guarantee your availability. As part of this agreement they will get the first X hours of support for no additional cost (up to the value of the retainer) then at an agreed hourly rate after that.
This will allow you some ability to plan/predict your income for future periods.
they thread is very old, please start your own, however there has been a number of recent posts on barcode scanners it may help to read these first.
not to mention that you haven't set the connection string to anything.
what is the problem, what is it producing and what did you expect
one thing you might like to look at is J is declared as an integer, IndexOf takes a int32 as a parameter, but it may not matter, VB may to the conversion for you
why don't you try opening the csv file as a datasource rather than a file
similarly the xls and use SQL
INSERT INTO myXLdb (col1, col2, col2) SELECT col1, col2, col3 FROM myCSV
Can I suggest you simply install XP rather than windows 7 on the PC.
you can get that info from an API call, here is a link that will show you how
If a file is being held open by another process there is no way for you to delete it until that process terminates or releases the file.
this looks like something you should be doing in your firewall. VB6 is an application development tool
mod may be a reserved word try putting square brackets around it.
Set rc = db.OpenRecordset("select * from tablename where [mod] = '00B3C9'")
The "database stuff" is one of the first steps, before you understand what data you are going to store and how it is organised you can't really design an application to maintain it.
First think of all the data elements you want to collect
student name, date of birth, amount paid, event name etc. Then try and establish the entities to which they belong. eg student name and date of birth belong to student. Event Name belongs to event.
Once you have them grouped into entities think about how the entities relate to one another eg Student attends event
Now build your self a database, (most easily in MSAccess) to hold this data. If you have done all this well, then designing the interface will be a piece of cake.
you will have to parse the line yourself I think. check out the instr, and mid$ functions. The presence of a second set of brackets is going to make it tricky. have a think about the logic and post what you come up with.
hex is only a way of representing a number for human consumption, they are held in binary after all.
What is the data type that is holding the number, is it a text string or an integer. That will determine what your findfirst looks like. Text fields have quotes around them, integers do not.
not that I am not a great fan of VB6 but don't you think it would be more appropriate to tackle your assignment in a more modern language, say vb.net
alternatively, it is a piece of cake in MS Access
The barcode scanner will have come with some drivers, install these and it should work as described above.
rows 23 - 37 can be replaced with a single SQL statement
cmd.CommandText = "UPDATE booking_details INNER JOIN Table_Details ON booking_details.TableId = Table_Details.TableId SET Table_Details.Reserved = "No" WHERE (((booking_details.ReservationId)=" & Id1 & "));"
not only less code but it will execute much much faster than manually looping through.
check out the eval function from the microsoft script control
you don't need a two dimensional array. Read a name from the file, then loop through the names that you have loaded until you find one that is less than this one. insert the name in the list before this entry.
when you are complete read the list from the start printing it as you go.
Are you sure this is the correct approach, the barcode scanners I have used present the data as if it had been typed on the keyboard. ie. you set focus to a text box, scan the barcode and the barcode appears in the text box followed by a CR.
If you want to process the barcode you put some code in the LostFocus event of the text box.
I don't really think that shelling out to a batch file is particularly good. It might be better to write to the printer directly yourself. you can open it as follows
open PRN for output as #2
As far as previewing, why don't you load the lines from the file into a list box then your user could scroll up and down through the report.
So is ByVal the default?
add a button to your form and copy the code you have above to the click event.
Look for documentation on the UPDATE keyword, you use SET with that.
please post what your database looks like, ie what tables does it have and what fields are there in each table.
or possibly
combobox.refreshitems
for printing see this post.
http://stackoverflow.com/questions/4268777/how-to-used-print-dialog-box-for-print-a-document
first you will need to change your database table to store the privilege.
second change the SELECT statement to something like
sql = "SELECT Privilege FROM Usertbl WHERE ......
you can use the rec.recordcount to determine whether any records were returned.
rec!privelege to retrieve their privileges
why are you storing the priveleges in a separate table, you could have another field in the Usertbl to hold them.
Then change your select to read the priveleges, rather than the count that is there are the moment.
well in the first instance, probably the number should be generated by the database.
secondly, this field should have an index indicating no duplicates, eg the primary key, then there is not this situation can occur
the way calculators normally work is that
You type the first number
You hit +
You type the second number
You hit = (or plus again)
So you need some variables to remember
1. the first number that was typed,
2. the operator that was clicked
Your numbers should be buttons not labels with code like
private sub cmd1_click()
lblTotal.text = lblTotal.text & "1"
end sub
when the user click on the plus you have to remember this value and the function
private sub cmdPlus_Click
FirstNumber = lblTotal.text ' FirstNumber will need to be a module based variable
Operator = "+"
lblTotal.Text = ""
end if
the code for = will need to be something like
private sub cmdEqual_Click()
select Case Operator
case "+"
lblTotal.text = lblTotal.text + FirstNumber
case "-"
lblTotal.text = FirstNumber - lblTotal.text
end select
end if
If you are writing them out again as text strings why not just declare them as string on lines 10 & 11.
If you want to validate then try using the IsNumeric function, ie
if not isnumeric(dblYearlyIncome.text.tostring) then
msgbox "some error"
exit sub
end if
Either that or, after you have loaded the table, open its tabledef and check the field name of each field, changing if necessary.
sounds interesting, let us know what you come up with.
shouldn't line 4 be AS not S