Get A Button (btnWisBedrijf) That Only Deletes The Company (Bedrijf In TblBedrijf) If It Doesn't Excists Anymore In TblKandidaat (Bedrijf)?
May 31, 2011
I have a database with 2 tables. One is a table with persons and one of the entries is also saved in another table.
tblKandidaat = person info (Bedrijf, Naam, Status)
tblBedrijf = Companies (Bedrijf)
I have a listbox (lbxBedrijf) that is filled with the companies (Bedrijf) from tblBedrijf.I want a button (btnWisBedrijf) that only deletes the company (Bedrijf in tblBedrijf) if it doesn't excists anymore in tblKandidaat (Bedrijf).
View 1 Replies
ADVERTISEMENT
Jan 29, 2010
i have a simple code that send an e-mail, when i try it running in debug mode it works fine, after compile, i run the exe but the same code doesn't work any more..
View 2 Replies
Jun 30, 2010
For a month now I cannot see one of my servers disk info anymore. I have tryd with both of this codes.On the first code I get this error "Failed to optasin Server Information".[code]On my second code to just give disk space on c: I get this error "Drive already mapped" and "Drive not available or forlder not accesabile".[code]
View 1 Replies
Jun 5, 2011
I have four comboxes all containing A,B,C,D. My problem is if I have chosen letter A on the first combobox, the last three won't have letter A anymore, then on the second combobox, if letter B is chosen, the last two will have C and D and so on.
View 8 Replies
Mar 18, 2010
When i click a song in Playlist1, when it's finished it goes to the next one.But when i click a song in Playlist2, and when that one is finished, it goes to the next song in Playlist1. I don't know whats wrong in my code, i've been looking through it finding the mistake, but i just can't find it. I actually need it in 2 days so if anyone could help me it would be great.
View 11 Replies
Mar 8, 2009
For the last half an hour, whatever changes I make in my app, when I hit the green arrow to start debugging nothing changes. The app seems to be running from a previous build?There's no error/warnings/messages on build.
View 2 Replies
May 26, 2012
I have a user control which consists of a dataviewgrid with some extra panels controls etc.I have just updated this program from an old version of vb where the tab control was just a row of tabs with no actual child pages attached.so to use several of these userControls (called 'Pages' from now on) a Panel was created and placed underneath the tabs to give the illusion of tabpages.when a user clicked a tab the relevant 'Page' was brought to the top of the Z order. This was accomplished with a directory of the 'Pages'..This all worked fine until I decided to change to using the TabControl in VS 2010.
So I didn't need the Panel anymore I just added the 'Pages' to the TabPages instead and I could also get rid of the directory to access the pages as it is not needed for display purposes anymore and for other access I could use the Tabcontrol.TabPages collection instead.Now when each 'page' is created and setup the dataviewgrid is loaded with a Table and the columns are re-ordered.I am loading approx 20 'pages' to the tabcontrol 1 to each newly created tabpage obviously. this is done using using a for each loop from a DB table.now the problem is that the first 'page' dataview grid has the columns re-ordered but none of the others do ! the Data is fine it's just the column order that's wrong.the same code is used for all (The setup is method of the 'Page') and i have stepped through the code and it all works OK with no exceptions. no code is missed but the grid order is OK for the first 'page' but not the others.everything else works fine the 'Pages' are all on the TabPages and the data is OK..Now comes the really weird bit! if I add the 'page' to the old unused panel before i add it to the Tabpage all the grids are re-ordered fine as in [code] Now the Panel is visible but not on screen if you see what i mean obviously if i move it on screen it's empty as the 'page' control can only be in one place and it's on the Tabcontrol..so why is it working ONLY when I add it first to the unused Panel? what is happening here? Oh BTW it only works for this Panel - not if i create a new one and add it to that..AND if the Panel Visible property is set to false the columns are not re-ordered again? I have tried deleting the panel and all code that uses it but the grids are not ordered properly till i re-instate the panel?
View 3 Replies
Dec 24, 2010
Nothing is printed in my debug output window anymore.
Debug
.Print does nothing.
"Debug > Output" shows empty Output window.
Note: "Tools / Options / Debugging / General / Redirect all Output" is checked.
software developer
View 1 Replies
Jul 24, 2011
I don't know what can I done, but suddently the statements autofill don't work anymore.I.e., I write Me. the window with the options appears, but if a write c (for close) the Close statement don't highlights, and I have to write the entire word.
View 2 Replies
Jul 11, 2010
My problem is with the following API.
Private Declare Function GetKeyState Lib "user32" (ByVal keyCode As Integer) As Integer In Windows XP, I could simply use the API like this: If GetKeyState(Keys.Left) < 0 Then 'Move Left If the key was pressed, it was a certain number below 0, the number itself alternated each time you pressed the key but it was always below 0.
My problem is that in Windows 7, when you press the Left key, the number isn't the same, in fact the number isn't even negative anymore. This problem tricked me at first into thinking the API didn't even work as when I ran the .exe of course my code did nothing since GetKeyState never returned a number below 0. I tested the value itself though and found that it never goes negative, the number for the key just decreases a little.
The weird thing is, while the .exe from the Debug folder proved my point that the GetKeyState number was different and thus the program didn't work, running the .exe from the Release folder actually worked, the controls were fine and the API returned numbers less than 0 for GetKeyState. But the .exe from the release folder was built with my old XP computer, as soon as I made a new build with my windows 7 computer the API stopped working again.
Why did Windows 7 change the number returned for when the key is down, is there a way to change it back without having to include some large package with my program? Why did the build from my XP computer work at first? Also it was only the one from the release folder, not the debug one, even though they were both from the XP computer.
I tested some more on windows 7 and found that every time I run the program, the number returned by GetKeyState is completely different. When the key is down the number is 1,000,000 units higher than up, but other than that the number is random each program start.
View 19 Replies
Mar 3, 2012
The application that I am working on is a Service Desk App. I have a form there that uses a DropDownList that contains employees names coming from the Active Directory. Any employee can make a request and save it. Problem arises when an employee leaves the company and consequently his account is deleted from the Active Directory. When some other employee searches the DB to finds a relevant Service Ticket that could be of his use, when tries to open it an error is thrown that indicates that the name does not exist in the DropDownList items.
UPDATE:I am adding some code so that it can be more clear.
<asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1"
DataKeyNames="ITRequestId">
<EditItemTemplate>
[code]....
View 2 Replies
Jun 27, 2009
I'm writing this prgram for class, and everything seemd to be working right except for my calculate button. It doesn't show the Calculation. Here is my code:
Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalculateTotalPay.Click
' declare variables
Dim hours As Double
[CODE]...
View 3 Replies
Jun 23, 2010
Assume an application uses the Dim SalesArray(1 to 10) As Integer instruction to declare an array named SalesArray. The array contains 10 sales amounts. When the user clicks the DisplayAverage button on the form, he or she should calculate and display the average sales in currency format. The code for the DisplayAverage button doesn't work. Fix it.
[code]...
View 2 Replies
Jan 14, 2011
So, I'm working on a simple game in Visual Basic, and I have 2 labels. One named "pointsLbl" and one named "pointsleftLbl":
pointsLbl.Text = "Points: " & points
pointsleftLbl.Text = "Points left: " & pointsleft I also have two integers, one named "points" and one named "pointsleft". The problem I'm having is that when the point boost button is pressed, the labels don't update and also don't show the new points and new points left. Private Sub boostBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles boostBtn.Click
[Code]...
View 9 Replies
Jan 30, 2012
I wrote a program which is editing data from database. I used few tutorials (I`m beginer) and everything is working fine(I can make changes in datagrid). but when I`m trying to save changes made in dataset(e.g. save added record) I can not to that (there are no changes in my access database, but inly in datagrid)what is interesting when I delete record - changes are saved and record is deleted from db. where is my mistake? what is wrong? maybe some tips what can I improve in this small program?
[Code]...
View 10 Replies
Mar 28, 2010
this code during button add click event
Private Sub cmdAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAdd.Click
[code].....
View 2 Replies
Jun 23, 2010
Assume an application uses the Dim SalesArray(1 to 10) As Integer instruction to declare anarray named SalesArray. The array contains 10 sales amounts. When the user clicks the DisplayAverage button on the form, he or she should calculate and display the average sales in currency format. The code for the DisplayAverage button doesn't work. Fix it.
Sub DisplayAverage_Click( )
Dim X As Integer, Total As Integer, Average As Single
If X = 0 to 10
[code].....
View 1 Replies
Feb 10, 2011
I used to do a lot of programming in GW-Basic and QuickBasic (ah, the good ol' days), but I'm a total newbie at VB2010. I'm trying my first programming sessions and using forums and ebooks to learn. There is one thing that puzzles me and I just can't figure it out.Private Sub btnOK_ Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click..When I click btnOK, certain codes are activated and Sub 2 is being called.Sub 2 calls Sub 3 and Sub 3 calls Sub 4.When Sub 4 is done, I want it to call the first form again, with the mentioned 'OK' button and have it wait for the button to be clicked again.My problem is, when Sub 4 calls the starting form with the 'OK' button, the program seems to "remember" that btnOK has been clicked and proceeds to run the code that follows. It does not wait for the button to be clicked again. I can't find out how to tell the program that the button has not been clicked on. What should I do? Is there a way to "reset" this button, so it doesn't remember it has been clicked on before? Or is Call in this case the wrong method to go from Sub to Sub and to the Form again and should I find another way to go through the program?
View 6 Replies
Apr 29, 2011
I have to develop an exe, which should remove my application folder
View 2 Replies
Feb 26, 2009
I have an application that has a timer. Every hour, the application will see what time it is. If it is after 5 P.M., then the application will shut the computer off. (For power saving purposes)I have a messagebox pop up warning the user. I want the user to be able to hit "Cancel" on a dialog box if he/she is still working on the computer and reset the timer to ask again in about an hour. If the user isn't there to select a button on the messagebox, I want the computer to turn itself off. But I can't get the code to skip the dialog box after so many seconds. [Code]
View 12 Replies
Sep 1, 2009
i am making a media player tha plays movies & songs etc etc but when i play a movie the rewind button doesn't work [Code]
View 2 Replies
Jan 9, 2012
When setting the Page properties with the PageSetupDialog there was a "Printer..." button in the lower right corner to set the Printer setting also. But in the same app under win7 the button is gone.
I've set:
PageSetupDialog1.AllowPrinter = True
but to no avail. Also tried with Admin rights...nothing
View 2 Replies
Jan 24, 2012
I have two (2) variables in a textbox (L7B) and (D2B).
TextBox3.Text = (L7B) &
" " & (D2B)
I want to write over (L7B) without changing " " & (D2B).I have been using the TextBox3.Text.remove command with success however in this case there are just too many scenarios. (D2B) isn't the same number of characters so I would have to determine the number of characters to remove in each scenario.
To write over (L7B) I thought I would try TextBox3.Text.remove ((L7B)). To my amazement VB accepted this command but when I run it it removes " " & (D2B). How is it removing the wrong variable? I could understand if it didn't work at all, after all that's what I expected to start but to delete the wrong variable !! why?
View 5 Replies
Dec 16, 2009
Just looking to keep application looking neat, One Form Parent / Child relation, set to cascade updates / and deletes. What I'm looking for is when the form loads the user enters some information for the parent (about 2 column out of 5), then I create a datarow with the information that I have. At this point before I actually send and update command, I would like to get the next scope identity for that datarow.
The reason is I also use that Identity as an Id number in this case a receipt number, and the user will enter detail data that is stored in the child, then calls the save function, this is when I intend to actually call the update to the database.
So the question is, Can I retrieve the scope identity for a datarow that only exist in the dataset without calling the update command and actually storing the data in the database? Or in my case creating my own auto index sub a better choice?
View 2 Replies
Jul 4, 2011
I'm writing a program which uses sockets, Now the issue I'm having is, If the packet received is over a certain size, the socket then fails to receive anymore packets/data after it.
View 3 Replies
Mar 4, 2010
Here's the routine:
[Code]...
The problem - The btnPause doesn't pop up until AFTER the thread sleeps, but the other two buttons works correctly. What the heck is going on? Here, I'm using the Sleep to simulate doing external events yet to be programmed.
View 6 Replies
May 7, 2011
I set up a test harness by checking for and then deleting records added to the db in the previous testing session, and then I test my recording adding code by adding back the same records.Interestingly this code works fine when there is a break in the debugger, but fails with a "duplicate key" exception when I let it run with no breaks, which leads me to believe there is some kind of concurrency issue.The basic metacode is as follows:
DoTest()
dim j as datacontext
dim recs = from myrecs in j.mythings select myrecs where myrecs.key="key1" or
myrecs.key = "key2"
[code]....
I've confirmed that I'm properly deleted the previous added records, and this works fine as does adding the new records when I have a break in the code before I hit the add records step. but without the break, it throws duplicate key exceptions in the "addrecordestomytable" method suggesting that it hasn't grabbed the current version of the table when it creates the new data context in addrecordstomytable, even though the records should have already been deleted.I've tried refreshing the table, but this doesn't seem to work either.Note backing database is ms sql server 10?
View 1 Replies
Oct 10, 2009
I want to make a program that deletes file(s) i ''Trash'' in VB08. If you know some codes just reply.
View 15 Replies
Aug 4, 2009
I need to write a program which deletes itself while running...How to do in vb.net and what is the concept to do it..
View 4 Replies
Jan 9, 2012
I have the following
[Code]...
I want to make it so it doesn't preform a button click if you press CTRL and Enter.
View 2 Replies