MS Access 07 - Use Button To Have A Combobox Appear And Selection Opens Appropriate Forms?

Jan 23, 2010

I am creating a document control system for standard operating procedures (SOP) in MS Access 2007. I have just started an online VBA class and have moderate MS Access 2007 experience. This thread is very detailed and lengthy.I have the tables set up and forms created for CREATE, SUPPLEMENT etc. I need to create a user interface so that when they open the database it pulls up a form that has buttons for "Start New SOP Process" and "Modify Existing SOP Process". Every step of writing an SOP is dated so that management can have outputs for target measures (to see why it takes so LONG to write an SOP from start to finish). After the user selects "Start New SOP Process" or "Modify Existing SOP Process" I am trying to have a Combobox appear with a drop down box of change types: CREATE, SUPPLEMENT, and REVISE.

Primary Key Explanation:Each document has a 3-part number comprising a 3-part PK. 1.001v1.0. Where 1 is (1-6) identifying what type of SOP: Document Type,.001 is the Document Series (a sequential number for each type of equipment--the 2nd SOP written for a document type 1 would be 1.002v1.0) and v1.0 is the version.

For example, lets say Document Type 2 indicates field equipment. The very first SOP written for a piece of field equipment would be 2.001v1.0. If a supplement is made to the SOP for that same piece of field equipment, then it becomes 2.001v1.1, if a revision is made to that same piece of equipment it becomes 2.002v1.0. If we buy a new piece of field equipment it would be assigned SOP document number 2.003v1.0.

After a document is changed (any part of the 3-part number is changed) the previous record is put into an archive table so that the technicians/general public have access only to the most recent version of each SOP. I am going to store them on Sharepoint with an Archive Folder and an Active Publications Folder and a link to the document is provided in the database. However, while a document is being modified (going through the SOP process of reviews and drafts) the users are going to need access to the previous version until the most recent version is approved (maybe I could have the document be archived upon completion of the Document Link control).

For each Combobox option I need a different "On Click" command to open the associated forms for each "Change Type". I have the necessary forms already grouped (using subforms and tabs) for each change type: CREATE SOP (has all of the forms needed when creating an sop), SUPPLEMENT SOP (has all forms needed when supplementing an sop), REVISE SOP (all forms for revising). I am trying to use If Then statements for this...

The modify part is the simplest. I think the Combobox for the "Modify Existing SOP Process" should consist of "Change Type" (CREATE, SUPPLEMENT, REVISE), "Document Type", "Document Series", and "Document Version". I want the "Change Type" to open up the correct group of forms with "Document Type", "Document Series", and "Document Version" finding the existing record that needs to be modified (i.e. so that the user can add dates for completed activities as the SOP process progresses: draft revisions, reviews).

The "Start New Process" is even more complicated. Each change type does more unique event procedures than just opening the forms (which I can't even figure out to begin with!!). The Combobox would still be "Change Type" (CREATE, SUPPLEMENT, REVISE), "Document Type", "Document Series", and "Document Version". However the following is what I am trying to do for each "Change Type":

When "Create" is chosen from the Combobox it will find the next record in the document series by the user selecting the correct "Document Type". I would like to add a formula so that it adds .001 to the previous record (giving the next sequential number), and force v1.0 to be entered and not able to be modified, since a newly created document can only be version v1.0. Then it would open the "CREATE SOP" form (all forms associated with "Create" compiled on one form by tabs and subforms--I already have this complete for each "Change Type") and require the user to fill out all document information controls (title, description, etc) before closing.

When "Supplement" is chosen from the Combobox it will find the most recent record by the user's input of Document Type and Document Series. I would like to add a formula so that it adds .1 to the previous Document Version. Then it would open the "SUPPLEMENT SOP" form. It would be useful if the fields for the document information controls (title, description, etc) were appended to this form but it is not necessary.When "Revise" is chosen from the Combobox it will find the most recent record by the user's input of "Document Type" and "Document Series". I would like to add a formula so that it adds 1 to the previous Document Version and forces the decimal value to be 0 (revise and create change types have to end in a "0"). Then it would open the "REVISE SOP" form. It would be useful if the fields for the document information controls (title, description, etc) were appended to this form but it is not necessary.Additional buttons I would like to have on the Main Menu Form--opened when the database is opened (includes "Start New SOP Process" and "Modify Existing SOP Process") would be:

"View All Publications" where a user can not edit anything, just gives them access to the current "active" SOP links. It would be a complete list of all of our SOPs. I think I could use a query "Retire" which would put an SOP into the Archive table/folder on Sharepoint. This would be useful in addition to the automated retiring of previous version in case we discontinue use completely of a peice of equipment or administrative procedures (yes we have SOPs for EVERYTHING!!)"Target Outputs" which would be a report showing the timeline of the SOP process so that management can see where we are spending too much time (my vote is for the design of the document control system!!)"Maintenance History" which would show all previous versions for each piece of equipment and administrative procedure."List of Archived SOPs"which would show all of our inactive SOPs, for the Quality Analysis/Quality Control person's benefit.

View 1 Replies


ADVERTISEMENT

Forms :: Assigning A Value To A Combobox Selection?

Nov 26, 2009

I have a combobox with multiple names. When I select one of the names from the combobox I want to display a value(number) instead of the name itself. How could I do that?

View 3 Replies

Forms :: Check Box In ComboBox Selection?

Nov 22, 2009

Wanted users to choose two options 1.(tick) 2 blank text so they can write things.

Was thinkin how this can be achieved using a comboBox. ?

View 1 Replies

Forms :: Get Hidden Value / Tax From Combobox Based On Selection

Feb 17, 2010

I have a combobox populated from the DB with:

-ID
-State
-Tax

State is the only value that is shown.I'm trying to get the hidden value, Tax, from the combobox based on the selection but can't figure it out.

View 5 Replies

VS 2010 Combobox Changing Selection Disables Button Again?

Nov 19, 2009

Ok so i'm trying to set up my program so that when I choose WinRar it opens a new window asking which architecture to use. I have a combobox set up with both architectures in it. I have the accept button disabled so that you have to choose an architecture and I figured out how to make it so that when you select one architecture it will enable the accept button but if you choose the other architecture it disables the button.

Private Sub cmbx_rar_wdw_arch_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbx_rar_wdw_arch.SelectedIndexChanged
If cmbx_rar_wdw_arch.SelectedItem = ("32-Bit (x86)") Then

[code].....

View 2 Replies

Forms :: Populate Textboxes Based On Combobox Selection NOT Using Databinding?

Apr 27, 2010

how to go about this? I have a form, frm1 w/a combobox, cboLocations, which is being populated using a sql string. There is also a frm2 w/a series of textboxes and other comboboxes. I want it so that once a selection is made from cboLocations, the textboxes and comboboxes on frm 2 are populated with the corresponding data. Here is what I have so far:

frm1:
Public Class frmLocations
Dim conn As New SqlConnection("Data Source=f03d3s-dev01; Initial Catalog=dos_track;User Id=vbuser; Password=tran3;")
Dim depot_refnbr As Integer

[Code]...

What's happening right now is that I make a selection from cboLocations on frm1 and click on the OK button, frm2 loads, but none of the textboxes are populating and one of the comboboxes, cboDepot, shows the different data when you click on the down arrow, but it's not displaying anything it its text field when frm2 loads.

View 4 Replies

Forms :: Button Selection At Runtime?

Nov 1, 2009

I use Microsoft Visual Basic Express edition 2008 on my Windows XP SP2 and in it, in a Windows Form project, I add a button to my default form and set it's flatstyle to flat and borderwidth to 0. At runtime, when I click that button, I get a black color hollow box on that button at it's center...

View 6 Replies

Forms :: Clear The Dgv When The User Blanks The Combobox Without Necessarily Changing The Selection Index?

Oct 25, 2010

I have just realised that ComboBoxes don't have a Change event. I have a combobox filled with a few items, eg. Bakery, Deli, Fruit & Veg, etc. Choose one of these items, all the related items show in the dgv. However, when I blank the text in the Combobox (press Delete key whilst Combobox has the focus), what event fires so I can blank the dgv? The combobox does not contain a Blank item. Even if it does, the Blank item only fires the ComboBox1_SelectedIndexChanged when the user scrolls down to, or clicks on, the blank value.

I want to clear the dgv when the user blanks the combobox without necessarily changing the selection index.

View 3 Replies

Listbox (20 Items) With Multi-selection And Label That Disply The Selection And One Button

Dec 25, 2010

I have a listbox (20 Items) with multiselection and label that disply the selection and one button. So I wrote (it works fine)

[code]...

Now when I click on button the label show lets say Item2,Item5,Item10,How do I take off the last ","

somthing like that Item2,Item5,Item10

I used to do: Dim s As String = Trim(Label1.Text)Label1.Text = s.Substring(0, s.Length - 1) but it give me an error converting intiger to string

View 6 Replies

Forms :: ComboBox And Label - Click Event Button

Dec 27, 2009

I have a Combobox1 and Label1 in a form. There are items in ComboBox1 which is integer from 1 to 9. I want the user select the number in the combobox, and the selected number will be * 2. The answer will be shown at Label1.Text without any Click Button Event.

View 2 Replies

Update Source Combobox To Printer Combobox Selection?

Mar 27, 2011

Is there a way to update source combobox to printer combobox selection?So going from printer1 to printer2 the source will update according to what that printer has to offer.

View 8 Replies

User Selects A Movie From A Combobox And The Corresponding File Opens?

Jan 6, 2010

I am working on cinema booking system project in vb.net..I have to book seats in the cinema..I have created a file for seat reservation for every movie..The seating is such that there are 18 seats and in the file have written 0s and 1s indicating reserved and vacant seats respectively..User selects a movie from a combobox and the corresponding file opens..We have to change the color of those seats which are already booked to red.Here is my code but it doesnt work..

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles movies.SelectedIndexChanged Dim Seat As Button() = New Button() {Form4.Button1, Form4.Button2, Form4.Button3, Form4.Button4, Form4.Button5, Form4.Button6, Form4.Button7, Form4.Button8, Form4.Button9, Form4.Button10, Form4.Button11, Form4.Button12, Form4.Button13, Form4.Button14, Form4.Button15, Form4.Button16, Form4.Button17, Form4.Button18}

[Code]...

View 5 Replies

Combobox - When Select A Value From The Combobox The Selection Won't Validate?

Feb 22, 2012

I'm having a problem with combo boxes. I usually use Java and it's been awhile since I used VB but I never remember having this much difficulty.My application is using an SDF file. From Data Sources, I drag the details on one of my Tables to my Form to get all of the fields. Three of them are comboboxes. Each of the three is an INT64 and each corresponds to a primary key in a different table. I click the tasks button on a combobox and for data source I select the appropriate table that has the data to go with the combobox, for display member I select the field that I want users to see, and for value member I select the primary key. Then I run a quick test and start the app, open the form, and add a new record. When I select a value from the combobox the selection won't validate because it doesn't think it's an INT64 like it should be. It seems to be using the display member as the actual value instead because if I change display member to the primary everything works great.

View 11 Replies

Fill A ComboBox On The Selection Change From Second ComboBox?

Jan 15, 2012

I have two comboBoxes, one is CountryCombo and second is StateCombo.What I want is the that when i the clicks country combo and select a one country then the States of that the country should get populated in the State Combo.I have tried things many many many but nothing working. Below is my code of how my CountryCombo is getting filled.

query="select CountryName from CountryMaster"
if dr.hasRows()
{[code]......

View 3 Replies

Make Forms Disappear When A New One Opens Up?

May 26, 2012

how to make forms disappear when a new one opens up?For example, I have a log in, and after logging in, the log in form disappears and my application appears.

View 1 Replies

Forms :: Access To Button Control Using Tabindex?

Jul 9, 2009

Lets say i have 2 button, button1 and button2 , and and tabindex of 1 and 2 respectively . So my problem is , how can i access to particular button and set the button.enable = false by using tabindex?

For example , i have an integer of 2 , then it matches the integer with the tabindex , then it will disable the button2 .

View 1 Replies

Populate Combobox From Selection Of Another Combobox?

Jan 1, 2012

I currently have a form with two comboxes. The first cbo is being populated with a project number, which is being pulled from the first column of a spreadsheet. I now want the second cbo to read the first cbo and then find that project number on the spreadsheet; when it finds that project number, I then need it to copy data from the row the project number is on. I have converted to vb from vba. Below is the code I used in vba (which obviously does not work). I only need certain cells from the project row.

Dim proj_num, rng As Range
Dim data, i As Long, j As Long
With Sheet1

[code].....

View 20 Replies

Make A Button That When It Is Pressed It Opens Up A Window?

May 28, 2010

is it possible to make a button that when it is pressed it opens up a window i am using vb 2008

View 10 Replies

VS 2010 - How To Make A Button Opens A .bat File

Feb 19, 2011

I have a few questions. first, how do i make it so that when you open your program you can not open ctrl+alt+del = task manager? second how do i make it so that a button opens a .bat file? third Is it possible to a button open multiple Internet Explorer Windows? When i try to do this it only opens a bunch of tabs? and lastly how do I make it so that when it installs on a computer it installs straight to the start-up folder without the user knowing it, or how do you make it so it opens automatically on start-up?

View 1 Replies

Make A Button In Program That Opens It When The Computer Starts Up?

Jul 31, 2009

I wan't to make a button in my program that opens it when the computer starts up but how would I do that? I am using Visual Basic 2008 Express Edition.

View 4 Replies

User Can Click A Button That Opens Up A Rtb With Every Single Word ?

Nov 13, 2010

I have a Search form where the user can click a Button that opens up a rtb with every single word (12,800+) used in the King James Bible. Every word is Capitalized ("Thankful, Grateful", etc), so in my code, the user selects a word, then right-clicks and sends the word to the TextBoxSearch in lowercase. Now, if the RTBDisplay (where all search results go) is empty, then a msgbox pops up asking if the user would like to re-search the same word in Uppercase. If they click OK then the word in the TextBoxSearch (lets says: "thankful") is supposed to become "Thankful". But instead, the TextBoxSearch goes blank. I have tried many variations of code, and here is my latest (doesn't work):

If Me.RichTextBoxSearch.Text = "" Then
MsgBox("Would you like to search the same word but in Uppercase?", CType(1, MsgBoxStyle), "Re-Search?")
If CBool(MsgBoxResult.Ok) Then[code]....

View 6 Replies

Create Button That Opens Form To Read / Edit App.config

Oct 28, 2011

I am trying to build a form that has a button on it that will open up a 2nd form that allows me to view and edit the connection string. I believe the connection string is also called app.config, and can see that in the Solution Explorer for the project.All I have managed to do is drag a button onto my main form and relabel it. I have no idea how to create code to access the connection string.

View 2 Replies

Form1 Has A Button On Click That Opens Form2 As A Show Dialog?

Jun 19, 2009

MDIform contains Form1. Form1's MDIParent is set to MDIform Form1 has a button on click that opens Form2 as a show dialog. I need this Action.Form2 has another button that opens Form3.Is there anyway that I can make Form3's mdiparent the original MDIform by passing Form1.mdiparent value to form2 (without actually setting that value) that then passes it to form3?

[Code]...

View 9 Replies

Excel 2007 Macro Opens Access Db But Then It Disappears?

Sep 24, 2009

This code worked fine in Excel 2003, but since upgrading to Excel 2007 (Office 2007) it's not working. In Excel 2003 it opened the access db form and stayed open. In Excel 2007, you can see the db open, then the form, but then it immediately closes. I've checked to code and it still works fine in 2003. Can anyone tell me how to fix this? Here's the code:

Sub OpenDatabase()
Set a = CreateObject("Access.Application")
strDB = "C:Weekly FilesWeekly Db.accdb"

[code]....

View 4 Replies

VB 2010 Express Opens MS Access Database As Read Only

May 16, 2011

I am brand new to VB. I am using VB 2010 Express. I have a MS Access database and can read & display the data. However, when I enter a line of code to manipulate the data I get a "read only" error message in the project editor. I have checked the file and directory structures from windows and the command prompt. I have even used the "attrib" command to make sure the file was not read only. Then I put the following code in the form and it dispaly the read only message.

Dim infoReader As System.IO.FileInfo
infoReader = My.Computer.FileSystem.GetFileInfo("C:zzz-devaccesswhitneywhitney.accdb")
If infoReader.IsReadOnly = True Then
MsgBox("File is readonly!")
End If

I am using the VB 2010 Express DataSource to connect to the MS Access database and not a connection string in the program.

View 7 Replies

DB/Reporting :: Opens Up While Clicking The Export Button Of The CrystalReportViewer By Default Filters?

Feb 20, 2011

The SaveFileDialog that opens up while clicking the export button of the CrystalReportViewer by default filters the predefined file types. Is it possible to custom define which files to be filtered?

View 5 Replies

ClearDataGrid On New ComboBox Selection?

Aug 15, 2011

i have used the following code to populate a DataGrid based on the contents of a textbox. the users searches for a name which is populated into a combobox based on the name in the combobox several textboxes are populated with data based on the data in one of these text boxes Private bindingSource1 As New BindingSource

[Code]...

View 9 Replies

Get Value Of Selection In A Checked Combobox?

Jan 28, 2012

I have put all of the items from my Database into a Checkbox Selection, I now want to take the selection that the user makes from the checkbox and turn that into a string that I can then COMPARE through antoehr table.[code]...

View 7 Replies

Load A Combobox With Selection From Another?

Mar 26, 2009

Load a combobox with a selection from another?[code]....

View 2 Replies

Mulitple Selection Combobox?

Jun 18, 2012

Basically, I need a combobox populated by data in a table column that I have created.The user will need to be able to pick more than one option.

For example:
Pizza Topping
+ onion

[code]......

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved