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 Replies


ADVERTISEMENT

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

Selecting Top AND Bottom Values

Dec 22, 2005

Hi all! I have a tough problem I was hoping I could get some help with:

I would like to create a recordset based on the "middle" 50% of the data. I need to chop 25% off the top of the data, AND 25% off the bottom of the data.

Any ideas?

View 3 Replies View Related

Selecting The Two Highest Values Among Three Fields

Sep 13, 2006

I'm teaching this term, and have put my grades and roster in Access. Each grading opportunity is a separate field.

Students will have to take 3 exams (Exam1, Exam2, and Exam3); however, their grade is based only on the 2 highest exam grades. There are other grades...FinalPaper, Attendance, Paper1, Paper2... the total of the grades is 600 points.

I can do the other calculations... what I do not know how to do is to select the two highest test values from the 3 Exam fields. I coudl do it manually, but I really prefer to simply enter grades, and then have the final grade calculated.

Thanks.

Gayle Ann

View 3 Replies View Related

Selecting Lowest Values In A Query?

Feb 23, 2006

Hi all - I have a table that contains Client ID, Supplier Name, Order Number, Order Date, and Price.

Example -

Client ID -- Supplier Name -- Order Number -- Order Date -- Price

1111111 Supp A 222222 1/2/06 1,000
1111111 Supp B 222222 1/2/06 2,000
1111111 Supp C 222222 1/2/06 4,000
1111111 Supp D 222222 1/2/06 500
1111111 Supp E 222222 1/2/06 1,200

I need to determine the 2 lowest prices per order number. In this case that would be Supp D - 500, and Supp A - 1000.

I am using the Top function and sorting the price in ascending order to get the lowest two prices. The problem is that it selecting the lowest 2 prices of all the orders on the table, not each individual order. I tried grouping on the other fields, but still came up with incorrect results.

Any ideas? Thanks!

B

View 3 Replies View Related

Forms :: Values Change According To Selecting Value From Another Field

Apr 16, 2014

I am working on a school database, today I am working for fee collection form and I am facing trouble.In attachment At the top right area the hidden field I would like here changes according to selecting Fee Type under Fee Detail. I want to achieve this,

If feetype is ABF then Hidden field = 1500110
If feetype is ASF then Hidden field = 1500120
If feetype is EXF then Hidden field = 1500130
If feetype is MTF then Hidden field = 1500140
If feetype is RBF then Hidden field = 1500150

How I can perform this ?

Table structure is
(tblstudents) Contain students data
(tblFee) Contain, Student Id linked with student table, month, year, amount, date, narratives and FeeType that looup values from FeeType tbl, this hidden field also in tbl fee.

The codes that are 1500100,1500120,1500130

These are necessary for GL entries that's why I must have it on my form. I had as well apply method of Default value but in that case I only present only a single value, but I want that in hidden field values take changes according to the fee type.

View 3 Replies View Related

Selecting Multiples Values From Listbox To Generate Report.

Aug 5, 2004

I have searched all the forms but could'nt find any answer which would help me , I have created a listbox , it works fine till the moment i set its 'Multi select' property to SIMPLE or EXTENDED , the minute i do that i get no results in my query , could someone please help me with this , i really really need to get this workin!! I have also uploaded my database so u could try it yourself...

View 11 Replies View Related

Modules & VBA :: Fill In Values In Column After Selecting A Value From Combo Box

Jun 4, 2015

I have a form that is a datasheet. it contains multiple records. One of the fields in that datasheet is a combo box. I would like to make it so when I select a value from the combo box it changes all the values of the other records in that column/field to what was chosen from that combo box. is that possible?

View 4 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 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

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 1 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 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

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

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

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

Unable To Update A Field In Record In My Form After Selecting From Comboox.

Apr 25, 2005

Trying to update a field in a record in my form after selecting from a comboox.

This an orders form with a record per row for order items. I select the product from a dropdown list which is populated by a dynamic query from the afterupdate event on another combo. When I do the selection access reports the following error:
Runtime error 3331
to make changes to this field, first save the record


Debug takes me to the line :
Me!product_id = DLookup("product_id", "products_table", myvar)
from :
[code]
Private Sub comboProd_description_AfterUpdate()
Dim strFilter As Integer

comboProd_description.Value = comboProd_description.Column(1)

myvar = comboProd_description.Column(0)



Me!product_id = DLookup("product_id", "products_table", myvar)

[end code]

I'm lost as to what to do (no such thing as beginners luck!!). I'm not even sure if the error is from the combo box or from the field that it is trying to update (product_id)

Thx for looking

Kev.

View 1 Replies View Related

Selecting From Table In Form Creating New Entries As Opposed To Using Existing

Sep 18, 2012

I have setup a simple access database consisting of 3 tables

Volunteer
Id (PK)
Name

Job
Id (PK)
JobName

Link
Id (PK)
VolunteerId (FK)
JobId (FK)

There is a one to many relationship between Volunteer and Link and a many to one between Link and Job

I want to create a form from which I'll select a Volunteer Name and then choose a JobName from a list box of options and have it create an entry in link with the id of the volunteer selected and the id of the job selected

So let's say there are 5 entries currently in the Job Table.. let's call the JobNames A,B,C,D and E.

In my form I select my name from the list (sourced from volunteer.Name) and then select B from the dropdown. My desired result would be a single entry gets created in Link with VolunteerId = 1 (representing me) and JobId = 2 representing the selection of B. Problem that I am having is that after I select B in the dropdown it creates a new record for B in Job and the Link table gets updated with that JobId as opposed to simply using the one that was already in the table.

View 1 Replies View Related







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