Duplicate Form After Selecting Value From Combobox

Jul 7, 2012

I'm pretty new to Access 2007. I have a form and in it there are data entry records including a combobox.

I'd like to select a value from the combobox, say "1" and when I do I would like all the information on that form to be duplicated in a new form.

I'd also like a message to pop up saying that info has been duplicated and that the user must update some of the fields.

View Replies


ADVERTISEMENT

Selecting Existing Table Name Using Form's Combobox For A Query

Dec 12, 2006

Folks,
can someone help me on this? I am not sure why the select query inside this procedure is not working. Here is the that routine:

Public Sub temp()
Dim strDocName As String
Dim strTableName As String
Dim strTbl As String
Dim aot As Access.AccessObject
Dim strSQL As String
Dim rpt As Report
Set rpt = CreateReport

strTbl = Forms!frmSearchBoilerGuar!cboTypeOfGuar

For Each aot In CurrentData.AllTables
If aot.Name = "strTbl" Then
strTableName = strTbl
End If

Next aot

strSQL = "SELECT tblProjts1.chrProjectName, tblProjts1.chrBlrPropNum, " & _
"strTablename.memGuranItem , strTableName.memLDs FROM tblProjts1 " & _
"FROM tblProjts1 LEFT JOIN strTableName ON" & _
"tblProjts1.intProjectId = strTableName.intProjectId"

rpt.RecordSource = strSQL
strDocName = "rpt"

DoCmd.OpenReport strDocName, acPreview
End Sub


Basically, I am trying to select a table name from the combobox and then use that table name for my query. Then I want to use that query as a recordsource for my report.

Any help is greatly apprecited.

Shan.

View 2 Replies View Related

Forms :: Enabling Some Form Controls After Selecting From Combobox

Jan 27, 2014

I have combo box in a form. I want to enable (to highlight) some controls in the form after selecting any value from my combobox.

For example, There are three values in the combobox. And :

When I select value1, I want an unbound combobox1 to be enable (This combobox is synchronized with a bound combobox2). So when this unbound combo is enabled, its synchronized bound combo should also be enabled.

When I select value 2, it should do the similar action on a different unbound combobx3 (which is synchronized with a combobox4).

View 11 Replies View Related

Selecting From Combobox Into A Code

Aug 18, 2005

HI,

I have an input form on which I have a combobox.
The user can choose from the list of products. However, I want to use this input in a code and I need the productid to work with in the code. How can I arrange it that when the user selects, they can see the name of the product and the id (not necessarily), but once the input is chosen only the id serves as input and thus in my code I only use the id ( number)???
Stacey

View 2 Replies View Related

Selecting Memo Field From ComboBox

May 29, 2005

Hi All,
I am not sure if this is an easy one or not..
I have a field in a table named Stock_Alias. This field was originally set as a Number field. I have a combo box on a form, which contains the Stock_Alias numbers. When a number is selected, the remaining fields are shown in text boxes.
I have had to change the Stock_Alias field to a memo, to incorporate Numbers & Characters.
I cannot seem to hit on the right code to get the same results as i did when the field was a number field..


This was the code I was using to select the field as a number...

Private Sub Cmbo_Stock_Alias_AfterUpdate()
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Stock_Alias] = " & Str(Me![Cmbo_Stock_Alias])
Me.Bookmark = rs.Bookmark

End Sub

View 4 Replies View Related

Selecting Multiple Items On Combobox

Nov 23, 2006

Hello to all .

Have you got any idea ?

I have a List Box in a table and it is set to permit multiple items selection
from it .

The fact is I can select, as I wanted, multiple items from it through
the Form but when I go to the correspondent table to see the results
the selected data from the List Box isn't there .

Note all data selected from the List Box is visible trough the Form but
not the table .

Has this problem anything to do with mismatch in data type configuration on the table ?


Lots of thanks in advance

Miguel

View 1 Replies View Related

Forms :: Selecting Fields In A Combobox Where ID Matches

Nov 24, 2013

In my Patients table i have a field called PatientID (AUTONUMBER) as my primary key I hve another problem. Is this possible as i hve been trying for two days now. I hve tried a lot of ways but i cant get it to work right. I have a table called dependents. ID , PatientID,,Dependents,DOB,Age id being the PK AND PatientID as a number I have a table called vitals. with ID,PatientID,PatientName( which is a dropdown of Dependents), hpp,sats etc. (This is a subform in datasheet style in another form)

In my table vitals i have the follwing for PatientName . comboxbox.

SELECT Dependents.Dependents, DateDiff("yyyy",[DOB],Now())+Int(Format(Now(),"mmdd")<Format([DOB],"mmdd")) AS Age FROM Dependents;

So it selects fine in a dropdown like John 48, smith 36.

The problem i have is that it selcts all the records irrespective of PatientID.

View 14 Replies View Related

Queries :: Admission Details Of Patients Admitted To Hospital - Selecting Duplicate Records

Feb 3, 2014

I'll first of all explain the purpose of the query. I've built a database to record the admission details of patients admitted to hospital. Amongst other things, the database captures date/time of admission and date/time of discharge.

The query I am building needs to show patients with multiple admissions, and in particular, the number of days that have elapsed since they were last discharged. Within my query is the following subquery that I had written to show this aspect of it:

(SELECT TOP 1 Dupe.[Discharge Date]
FROM [Inpatient Database] AS Dupe
WHERE Dupe.[CHI Number] = [Inpatient Database].[CHI Number]
AND Dupe.[Discharge Date] <= [Inpatient Database].[Admission Date]) AS [Previous Discharge],

Note: "CHI Number" is a unique reference number assigned to every patient.

I then display in a column [Admission Date] - [Previous Discharge].

This works fine where a patient only has one previous admission. However, where a patient has multiple admission, the subquery always returns that patient's first discharge date instead of their most recent discharge date (because I have used the "TOP 1" predicate). It seems that it should be straightforward enough, however I can't seem to work around it. Anything I try results in errors, and so I keep defaulting back to my "TOP 1" solution.

i.e. What I want it to show is:
Name.......Admission Date...Discharge Date.... Previous Discharge... Days Between Admissions
Joe Bloggs ..01/01/2014 .......10/01/2014
Joe Bloggs ..15/01/2014 .......20/01/2014 .......10/01/2014 ..............5
Joe Bloggs ..27/01/2014 .......01/02/2014 ........20/01/2014 .............7

However, what it actually shows is:
Name ......Admission Date ...Discharge Date ...Previous Discharge ...Days Between Admissions
Joe Bloggs ..01/01/2014 ......10/01/2014
Joe Bloggs ..15/01/2014 ......20/01/2014 ........10/01/2014 .............5
Joe Bloggs ..27/01/2014 ......01/02/2014 ........10/01/2014 .............17

View 2 Replies View Related

ComboBox Problem With Duplicate Values

Feb 17, 2005

I am using a combo box to select client records. The problem I am having is that there are several clients with the same last name.
The query behind the combo box sorts on Last Name, First Name.

When I (as an example) select the second listed duplicate name from the combo dropdown, The form is populated with the data from the first duplicate name. (example Jones, John or Jones, William).

How can I make sure that the selected name will populate the form?


Thanks

View 1 Replies View Related

Forms :: Subform Continuous Combobox Duplicate Value?

Jun 25, 2015

I am setting up a subform in continuous with combobox, but when I enter the data on the first combobox, it duplicated to all the following records. Is there a way to stop that?

View 2 Replies View Related

Selecting Data From A Combobox To Get More Data In A Listbox

Nov 21, 2005

im new to this so hello every1!!!

umm.. i have a form with a combo box which is linked to a table which gives me customer id numbers. and i have a listbox which i want the names and addresses to appear when i select a cusotmer id number from the combo box

so on the list box i put
" SELECT CustName FROM Customers WHERE CustID=$combo43; " in row source; if i change $combo43 to 0 the name appear but that is fixed and i want it 2 change when i select a cusomer id number from the combo box

can some1 plzz help me, its 4 my college project!

thanxs in advance!

purejoker!

View 1 Replies View Related

Modules & VBA :: Unbound Form - Selecting Label OnClick Does Not Recognize Changed Form Field?

Feb 5, 2015

Access 2007
Unbound Form

I have a onclick tied to a label (for decoration purposes) that when clicked it launches VBA that essentially updates a form. All that part works except it will not recognize any changed value of the field I was last in?

Just to try to explain best as I can what happens.

- Form gets opened
- I change field (quantity field)
- I click the Label
- It reverts to pre-existing value.

if I click off of the text field first then do the onclick - it recognizes just fine.

View 7 Replies View Related

Selecting Values From A Value In A Form

Apr 20, 2006

Right.
What I want to do is use a value obtained in the form (obtained from a list-box selection) to select a record in a table, then return one of the fields to a text-box on the form.
All the values coming from the list-box are unique, and the value returned is a simple integer.

Is there any way to do this reasonably simply?

View 5 Replies View Related

Selecting Form Objects...

Feb 4, 2005

Is there an easy way to change the font-size properties of all objects on a form?

I guess the first part of this question is there any way to all the form objects at once? (without making reference to each one individualy)

View 1 Replies View Related

Form Selecting Record! Help

Sep 6, 2006

I have a couple querys that rely on this statement:Like "*" & [ Project Number ] & "*"Now that makes a box pop up for the person to fill in specific information.

Now, is there a way to make a form that a user can choose a job from a drop down box, which then when click "next" it will execute a query with what was selected from the drop down box?

If anyone could help, id be very greatfull!

Thanks
~Jon

View 1 Replies View Related

Selecting Control To Link To New Form

Feb 13, 2006

Hi,

Have been developing an Employee DB which includes sickness records and interview information. Have mangaged to sickness records but now I need to link interviews to these specific records which is where I am having a problem.

All sickness records are shown on a sub form and I attached a button at the end of each record so that I can can add interview information that is linked to the sick record through SickID but just cannot get it to work.

Have attached relevant forms and tables and could really do with some help as am pulling my hair out here.

Cheers

View 2 Replies View Related

Selecting Records Through A Form For A Query

Jul 13, 2006

I have a problem I should be able to solve, but I can't think my way around it.

I need to automate a series of tasks to perform the following:

1. The user clicks a button on a menu form and arrive at a select records form.
2. The user makes choices regarding the contents of certain fields (blank, not blank, equals a text string, etc.) and presses OK.
3. On the OK click, the fields are applied to a query, the results of which are exported in an excel spreadsheet.

I've been doing step 2 and 3 by hand in that I alter the selections in the design view of the query and save it. I then run a macro that deletes the data in the current table, runs the append query with the new criteria, and creates an excel spreadsheet of the new data.

However, I now have to make this functionality available to a non-tech person, thus the need to create a GUI menu that can launch a form on which the user can select options and with a single click, launch the macro.

I've tried adapting select forms that I've used with forms and reports using the doCmd.openquery, but they will only work for select or crosstabs, not appends. I considered having the form create the query and then qrite the append query off that, but I can't seem to get that to work.

Can anyone give me some direction on where I can take this?

Thanks.

Susan

View 1 Replies View Related

I Need A Form For Selecting Input Files

Sep 13, 2005

I need a form for selecting input files. I already have my VBA code, queries and so forth for what I am going to be doing to my files, but now I need to have a form that will allow me to select different files for processing.

Does anyone have a sample, a snippet of code, or suggestions as to how I can achieve what I'm looking for?

Thanks in advance!

View 3 Replies View Related

Update A Form By Selecting From A Combo Box

Apr 13, 2005

I have an unbound combo (because it is synchronised with another unbound combo box) box that selects a record, but I can not get it to update the rest of the form to show the required data.

The form looks up project data from 3 seperate tables which are all linked by relationship.

What do I need to do to make this work?

Thx for looking.

View 2 Replies View Related

Modules & VBA :: Selecting Date Given In A Form

Feb 16, 2014

I want to select a subset of table called TRP. It should extract me all records

which got the property Valid to date < enddate.

enddate is a date selected by the user in a form .

Somehow it doesn't recognize the enddate in the following :

Code:
Public Sub test()
DoCmd.SetWarnings False
DoCmd.RunSQL "SELECT TRP.* INTO [TEST] " & _
" FROM TRP " & _
" Where TRP.[Valid to] < enddate"
DoCmd.SetWarnings True
End Sub

View 14 Replies View Related

Modules & VBA :: Selecting Combo Value Changes Checkbox On Other Form

Nov 10, 2014

I have form 1 that brings up a record, I then open up form 2 with that record details.

On the 2nd form I have a 'status' combo box with values 'OK', 'bad', 'unsubscribe'.

I want to change the value of a checkbox, 'Active', on the 1st form, 'Maildelivery', from true to false if the combo value is changed to 'bad'

Here's the code:

Private Sub cmb_status_AfterUpdate()
If Me.Status <> "OK" Then maildelivery.Active = 0
End Sub

View 3 Replies View Related

Forms :: Selecting Only One Record In Continuous Form?

Nov 13, 2013

I wish having only one record display in a continuous form, after an "On Click" event. The database in which this question lies is attached.

On opening, the user first interacts with Table 1 (Continuous Form), then by clicking on ID on the details for that particular record appear.

What I would like to do is: When the user clicks on ID, only that record whose ID has been clicked on displays first on the continuous form, and then the PERSONAL form opens. To clarify further, my wish is that the sequence of events is:

User Opens Table 1 Form

User Clicks on ID (for example, let's take 2)

Only Record with ID 2 remains on the Continuous form.

Then details for record 2 display on the Personal Form that opens next.

The problem I currently have is with step number 3 above.

View 10 Replies View Related

Selecting A Field From A Popup Form To Be Populate Another Text Box

Apr 6, 2008

I have a field on frmOutpatient which is called EpisodeID.
I need to populate this field from a selection in a pop-up form.

The pop-up form (frmSelect) is a continuous form with a number of different EpisodeID numbers according to the date the patient was admitted. At the end of each record I want to put a command button (cmdSelect) and when pushed I want this SelectEpisodeID to be transferred to the field on the frmOutpatient.

Any ideas??

View 6 Replies View Related

Modules & VBA :: Selecting Multiple Values From List In A Form

Dec 29, 2013

I am trying to use a list-control on a form to let the user select multiple values. I have understood that this requires some VBA-code to step through the selections in the list, since the "multivalue-selection" is set to "Extended".

When I try to execute the code I have (found and have tried to adjust), then I get the error message "Object required". The "ListCount"-paramater always only results in a ZERO-value, when i step through the code:

Function cmdOpenQuery_Click()
On Error GoTo Err_cmdOpenQuery_Click
Dim MyDB As DAO.Database
Dim qdef As DAO.QueryDef
Dim i As Integer
Dim strSQL As String

[code]....

View 9 Replies View Related

Generating Reports From A Form After Selecting Dates And Parameters

Sep 11, 2014

The input form of the database have one common table containing data for all parameters for row source. As all data was in one table had one ID. My problem is I am trying to run reports from a form after selecting dates and parameters.

For selecting parameters I created dynamic combo box. For dynamic combo box I needed ID and description of the parameters. So I created separate tables for each parameter with ID and Description column. Which ran me into the problem that when I run report based on main input form which has different row source table and my report form has different row source tables and reports doesn't run when I base my queries on the report form.

View 2 Replies View Related

Forms :: Selecting A Value For A Form From Another Form

Mar 30, 2013

I have a form (formA) with a sub form (SubformB) in it. In this subform there is a field (Candidates) in which I want to write a value by using another form (FormC). Sub form and the other form have different source tables (TableB & TableC).

What I want to do is;

While FormA is open, by clicking the field (Candidates) on (SubformB), I want to open (FormC). This form is a Data sheet. Then again by clicking a checkbox on this form, I want to assign the value to the field (Candidates) on SubformB.

View 1 Replies View Related







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