?
Solved

Forms & Data

Posted on 2007-11-16
6
Medium Priority
?
164 Views
Last Modified: 2010-04-23
Hi Guys!

My second question as I said....

Right I have 2 databases (Locations & Tags), 3 Forms (Form1(Main Form), Form2(Locations Data Form), Form3(Tags Data Form)). On form 1 there are 35 buttons, the text from these buttons is read from the database Tags directly, if I update these tags on Form2 the information is inserted into the database as it should.  When the form closes and returns to the main form, the buttons are not updated because the form is only hidden while data is updated then shown again. I cant use Me.Close because this makes the program close. Is there a code that I can put into the save button on the Tags form so that It updates Form1 before it is re-shown something like Form1.reload (A guess!).

The other this is that each button is assigned to a file name and when its pressed it plays music depending on which file name it is located to. At the moment this information is read from the text boxes on form2 which means that every time I load the program I have to load form2 from form1 then hide it. The string that windows media player uses is...

Dim item As WMPLib.IWMPMedia = AxWindowsMediaPlayer1.newMedia(Form2.TextBox1.Text)

As you can see all it is doing is getting the text from the text box on form2. Is there a way I can get the form to load this information from the database. Something like...

Dim item As WMPLib.IWMPMedia = AxWindowsMediaPlayer1.newMedia(LocationsDataSet.Locations.Cue1)

Then it would be accessing Locations table and Cue1 column?

Your help would be very much appreciated!

Lee
0
Comment
Question by:lfaulkneruk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 27

Accepted Solution

by:
VBRocks earned 2000 total points
ID: 20298775
If you change the following property, you will be able to use Me.Close without closing the program,
(This is for VB 2005):

Go to the Properties Menu | < Project Name > Properties | Applicaton Tab
Then look for the drop down list that says "Shutdown mode:" and select "When last form closes"

0
 

Author Comment

by:lfaulkneruk
ID: 20298913
Hi Guys,

Thanks for that suggestion VBRocks. I have however tried this and for some strange reason if I close form1 then open form3, update the data then show form1 and close form3 the information on form1 is the same as before I updated. i.e. form1 has not apated to the changes.

Lee
0
 

Author Comment

by:lfaulkneruk
ID: 20298951
Apologies, I fixed that problem. The database connection was remaining open and form1 could not read the database.

Any ideas on reading the location of a file in for the WMP string?

Lee
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 27

Expert Comment

by:VBRocks
ID: 20298958
Well, are you completely closing form1 and disposing of the object, or are you just "hiding" it and
then "showing" it.  If you completely close form1, successfully update the database with form3,
and then create a new instance of form1, query the database for it's data when you load it, then
show it, it should display updated data.  If it's not displaying updated data, then either you are not
fully closing form1, and reloading it when it opens again, or you are not successfully updating your
data with form3.  



0
 
LVL 27

Expert Comment

by:VBRocks
ID: 20298966
No ideas on the WMP string, sorry.

0
 

Author Comment

by:lfaulkneruk
ID: 20299028
Thanks VBRocks ill put the question out for the WMP string in a different question.

Lee
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question