General :: Using A Combo Box To Set Default Value For Subsequent Records?

Nov 29, 2012

I am trying to create a user friendly form to enter a list of competitors entering an event.

I would like the user to pick from a list of events and that event to be used for subsequent records until the user changes it.

I have used a combo box to pick from a list of events but that needs to re-selected for every new record. I then added a second unbound combo box to give the main combo box its default value. It works but is not very user friendly.

View Replies


ADVERTISEMENT

General :: Indenting Second And Subsequent Lines In Text Box

May 12, 2013

In a report, I have a text box with variable length text. Can Grow is set to Yes. If the box grows, I would like all the subsequent lines to be indented. Is that possible?

View 2 Replies View Related

General :: Combo Box Default Value

Apr 9, 2014

I got a COMBO BOX with 2 columns , for instance code and name.

CODE NAME
123 JOHN
124 JACK
125 BILLY
126 MARY

In the OPEN form action which the form using this combo to do some query action, I want to put a default value to this combo box after a VBA query result of which should return a name to this form. Just want to know how to put the result to this combo box, e.g. when the VBA query return a name Billy. What's the syntax to make this combo box equal to Billy and do corresponding query?? Thans a lot!! FOr the time being I just know the following syntax, but since the combo box got 2 columns and how can I know Billy is located in the third record?

Me.Combo24.DefaultValue = "FORMS![Master]![combo24].itemdata(0)"

View 1 Replies View Related

Queries :: Identify Subsequent Records Where Original Record Meets A Criteria

Aug 8, 2014

I have a table [PickData] in a WMS (Warehouse Management System) database, that records details of each item picked. The key fields are;

[Movement] - a unique ID for a collection of items to be picked.
[ToAssignRef] - the order ID
[Product] - the product!
[Picked] - the date/time the item was scanned
[Pick Actioned] - the date/time the [ToAssignRef] was completed
[Reason] - A code to indicate why an item could not be picked - AKA F3'd

An operative would be allocated a movement, connected to the [ToAssign Ref], containing a number of products to pick. If an item can not be picked for some reason the operative presses F3 and selects a reason (no stock, damaged etc). These F3'd items (other stock allowing) will later be picked on a different [Movement]. I need a query to identify the subsequent [Movements] and the associated fields following the occurance of an F3'd [ToAssignRef] & [Product].

I have a query, but it runs very slowly (perhaps due to the DB size currently 780K records). Is this the right approach, is there a better (faster) way to do this?

Code:
SELECT PickData.ToAssignRef, PickData.Product, PickData.Picked
FROM PickData
GROUP BY PickData.ToAssignRef, PickData.Product, PickData.Picked
HAVING (((DCount("[Movement]","[PickData]","([ToAssignRef]='" & [ToAssignRef] & "') AND ([Product]='" & [Product] & "')"))<>0));

View 2 Replies View Related

General :: Default Value Of Text Field With Selection Of Combo Box

Sep 9, 2014

In the database attached I have a form called from Candidates.In this form is a combo box where a user can select what company the candidate belongs too.

However some candidates are Private Individuals (do not belong to a company).Therefore, I want the Position field to be set to 'n/a" by default if 'Private Individual' is selected.

View 9 Replies View Related

Forms :: Based On User Selection In A Form / Create New Records For Subsequent Form

Feb 3, 2014

The user will be creating a new project that contains a bunch of releases. The releases have standard names which are stored in a table tbl_ReleaseNames It should be noted that the list of names is not static.

The user selects which of the releases pertains to their project and then based on their selections, new records would be created in tbl_RFP_Release and then a subsequent form would open where it would display each of these newly created releases where they could enter additional information. I thought of creating an unbound checkbox associated with each of the standard names, and then checking to see if the checkbox was checked and then creating the new records followed by opening up the new form.

View 6 Replies View Related

Default Combo Box Based On Default Table Value

Feb 13, 2006

Hi Everyone,

I hope someone can help.

I have a form with a combo boxes and a table with relevant list and additional field, fldDefaultDrive (Yes/No Field).

Currently in order to set the default value, I have used the following code for each default;

Private Sub Form_Load()
Forms!frmMediaLabeller!CboDriveName.DefaultValue = """D"""

End Sub

However, I want users to be able to go into the table and change the default value if thier CD player default Drive is anything but D: Drive. I have tried to replace the D above with an SQL statement but with no success.

Private Sub Form_Load()

Dim Drivename As String

Drivename = SELECT tblMediaDrive.fldDrivename FROM tblMediaDrive WHERE (((tblMediaDrive.fldDefaultDrive)=-1));

Forms!frmMediaLabeller!CboDriveName.DefaultValue = """Drivename"""

End Sub

This is definetly not working, can anybody help, I have a feeling it is syntax but not sure where? :confused:

Robert88

View 7 Replies View Related

General :: Combo Box To Search Over 100k Records

Mar 17, 2014

I have a database with over 100k records and I want to use a combo box to search for records by typing in the name. I found code to do this at: [URL] .....

This is working, however i have many fields on the form that I want to populate from the table after the search. Right now only the 3 fields from my rowsource combo box populate.

In my select statement do I need to SELECT * (all) and then populate the fields that way, or is there a way to populate from the table based on the ID of the record that is found?

View 3 Replies View Related

General :: Add New Records To A Table Depending On What Combo Box Displays

Jun 4, 2013

I need to add new records to a table depending on what the cbo box displays. I figure this is the way to do it but I it's not working, I have only writen the first select,

Private Sub Comando6_Click()
Dim dbPalavraChave As DAO.Database
Dim rstchaveCFEPC As DAO.Recordset
Set dbPalavraChave = CurrentDb
Set rstchaveCFEPC = dbPalavraChave.OpenRecordset("chaveCFEPC")

[code]...

View 9 Replies View Related

General :: How To Filter Records Using Multiple Combo Boxes

Jun 29, 2014

I have a table with the following 5 fields. (Service Type), (Valve Name),(Size),(Rating),(Description).

I want to do two thing:

First: I want to select the required information from the first 4 fields using combo boxes and get the last field (description) based on the selected 4 fields. In other words, i want the record to be filtered using first 4 fields to give me the last field info.

Second: I want to store the filtered record (all 5 fields) in another table.

View 6 Replies View Related

Forms :: Running A Subsequent SQL Query

Oct 2, 2014

I am writing VBA code behind a form that used SQL SELECTS on various tables - the results of one query determine the next. I`m using the ADODB object library:

strSQL = "SELECT * FROM Table1 WHERE Field1 LIKE " & value1
objRecordSet.Open (strSQL)

Then later:

objRecordSet.Close
strSQL = "SELECT * FROM Table2 WHERE Field1 LIKE " & value2
objRecordSet.Open (strSQL)

But, when I access objRecordSet.Fields.Item(x).Value it shows the results of the first SQL statement, not the new one. I'm trying to find a way to reset the object - is there a way to do this?

View 1 Replies View Related

Subsequent Action After Listbox Updates

Mar 28, 2012

I have a listbox on a form which displays data based on the value of a textbox. I requery the listbox every second or so using the timer event on the form. What I want to accomplish is that whenever the listbox changes, i.e. a new row is added to the list, a subsequent action (in my case, a beep) occurs.

I tried the afterupdate property of the listbox but that doesnt seem to work. The listbox is unbound.

View 9 Replies View Related

How To Prevent Subsequent System Date From Being Update

Jun 11, 2006

I've design a form as such when i FIRST add a NEW
RECORD, I want the system date to be capture into the
form. I have a table calls Register. And this table
has a field "DATE" which takes the value of the system
date(=now). However, when i open the same record the
next time, the orginal value(at the time when the
record is created) of the field "DATE" will be
replaced by the new system date. However, i do not
want this to be happen because i want the field "DATE"
to take the value of the system date when i first
created the record. My question is how to prevent
subsequent system date from being updated in the
record whenever i open the same record? Thank you.

View 1 Replies View Related

Combo Box Determines Default Value Of Second Combo Box

Mar 10, 2005

Scenario: I have a combo box in an evaluation db that is set up to return 3 columns - EmpID, Name, JobID. The combo box only shows Name, but properly updates the neccessary fields on the screen.

Problem: I would like to turn the JobID txt box into a combo box that would default to null prior to a Name selection (on a new record) and then default to the recorded JobID after Name selection. 99.9% of the time, this won't be used, but occasionally an employee will receive an evaluation for a JobID they did, but were not officailly assigned.

The right way to do it would be to create a second record in the primary system that I am polling the data from, but that is not feasible given the nature of that system.

Any ideas?

-Brian.

View 1 Replies View Related

Default Value For A Combo Box.

Apr 11, 2007

can anyone tell me how i can have the default value of the combo box field as the first value in the combo box drop down list?

View 3 Replies View Related

Combo Box Default Value

Jul 20, 2005

Hi guys,

I'm obviously doing something stupid in my form :-) If you open the form in the attached sample you will see that I have 2 combo boxes. One of them has a default value showing and the other doesnt, I want to get the second combo to automatically show the value in the list but just cant seem to get this to work...

I cant work out whats different bewteen the two. Been tearing my hair out here so would appreciate some input.

Thanks in advance

View 10 Replies View Related

Combo Box Default Value.

Sep 19, 2005

Hi guys,

In my form I have a combo box that is bound to a product/specification table.

When clicked, this combo box displays a list of products, each with its respective set of specifications (although I configured it so just the product column can be seen.) The reason I do this, is so that the specification values (against which certain other values in the form is critiqued) will be a static value in the form itself, and not a changeable value in a table.

What I want to do, however, is to let the combo box assume a default value when the form load (it must already have a product selected at start-up.)

How can I do this?

Thanks ahead!

View 4 Replies View Related

How To Set A Default Value On A Combo Box

Jan 26, 2006

Hi all,

Can some one help me with how to set a default text on a combo box whose record source is set to a query?

I have a form with two combo boxes. The first combo box’s record source is set to the following query:

SELECT chrCategoryID, chrCategoryName
FROM tblGuarCategory;
My 2nd combo box will list all the items based the category I select on the first combo box.

But when the user opens the form, instead of showing both combo boxes blank, I would like to display the following text:

Combo Box1: Select a category
Combo Box2: Select an item…

I tried to use the combo box’s Default Value property like = “Select a category”. It didn’t work. I am not sure what is missing here. I appreciate your help.

View 4 Replies View Related

Combo Box Default Value

Dec 14, 2006

I am sure this is a very basic problem but I just can't seem to make it work...

I have a form with a combo box. The values for the combo come from a table listing available month and year of various data. When the vlaue is selected in the combo box, the form refreshes the data to display that month and updates another table with that month that is used for a few different functions. Everything works great except that when you open the form, there is no value displayed in the combo box. What I would like for it to do is display the month that is equal to the value found in the second table, since that is considered to be the current month. I have tried various approaches to setting the default value and using a query in the control source but It still shows no value when opened. Any advice would be appreciated....

View 2 Replies View Related

Combo Box Default Value

Apr 28, 2006

Hello,

I have a form with a combobox which has its record source to a table which has 5 records.

Is it possible to open the form so that by default the combo shows a specific record?

I have tried something like this but does not work:

On Open event

Me.Cbo = "ID"

ID is the record I need to show.

Thanks.

View 1 Replies View Related

Combo Box With Variable Default...........

Jul 10, 2005

:confused: I was wondering if somebody can help with my default combo box problem?

I have a secured database whereby users logon, which is used as a scratch pad for keeping track of Purchase orders. A Form frmUserInput with two relevant fields for this problem 1. User Initials txtUsersInitials and 2. POBook (Purchase Order Book) which is the combo box cboPOBooks both unbound fields on the form.

The txtUsersInitials is generated automaitcally when the form is loaded using a VBA statement txtUsersInitials = Current User.

The list of the combo box is generated from a table tbleUsersPOBook and uses a query qryUsersDefaultPOBook as listed below;

SELECT tblUsersPOBook.UsersPOBookName
FROM tblUsersPOBook
WHERE (((tblUsersPOBook.UserName)=[Forms]![frmUserInput]![txtUsersInitials]));

This generates a drop box showing the Different department codes for each individual. So for some it is only one item for others up to three codes, this part works fine... :)

:cool: However here is my problem.

Since some people can sign off more than one Purchase Order book I have had to add an additional field in the table tblUsersPOBook called DefaultUsersPOBook which is a yes/no field, so only one yes exists for each user who logs on. I have created another query qryDefaultPOBook as listed below;

SELECT tblUsersPOBook.UsersPOBookName
FROM tblUsersPOBook
WHERE (((tblUsersPOBook.UserName)=[FORMS]![frmInputForm]![txtUsersInitials]) AND ((tblUsersPOBook.UsersPOBookDefault)=Yes));

When I place this query in the Default section of the combo box it gives me no result.

Firstly is it possible to have a varying default like this since each user will have a different default?

Or is there maybe a better way of achieving a default which is variable for each user based on thier default Purchase order book in the table tblUsersPOBook for the field "Yes" in DefaultUsersPOBook ? :confused:

View 8 Replies View Related

Default Value In Text Or Combo Box

Sep 26, 2005

I am trying to set the result of a query as the default value for a text or combo box. I have tried setting the query as the default value in the box's property. I have also tried doing it in VB. The code looks like this

Dim SQL AS String

SQL = "SELECT Address
FROM Table1
WHERE Name = Forms!Main_frm!name_lbx.Value;"

Forms!Address_frm!address_cbx.DefaultValue = SQL

I have also tried

Dim SQL AS String

SQL = DoCmd.OpenQuery([update address_qry])

Forms!Address_frm!address_cbx.Value = SQL

Where update address_qry is the same as the above.

I keep both forms. I know how to do it by setting the queries as values in a list box, then transfering the values to the text or combo boxes. But I was hoping there was an easier way.

Thanks
Alex

View 1 Replies View Related

Default Value In Text Or Combo Box

Sep 26, 2005

I am trying to set the result of a query as the default value for a text or combo box. I have tried setting the query as the default value in the box's property. I have also tried doing it in VB. The code looks like this

Dim SQL AS String

SQL = "SELECT Address
FROM Table1
WHERE Name = Forms!Main_frm!name_lbx.Value;"

Forms!Address_frm!address_cbx.DefaultValue = SQL

I have also tried

Dim SQL AS String

SQL = DoCmd.OpenQuery([update address_qry])

Forms!Address_frm!address_cbx.Value = SQL
Where update address_qry is the same as the above.

I keep both forms open. I know how to do it by setting the queries as values in a list box, then transfering the values to the text or combo boxes. But I was hoping there was an easier way.

Thanks
Alex

View 2 Replies View Related

Set A Default Choice In A Combo Box

Jun 14, 2006

I used a combo box to let user select "Proejct Status" such as active, completed, cancled. I want to set active as a default selection if user does not choose other status. How can I do that? Thank you very much for your help.

View 2 Replies View Related

Default Value In A Combo Box From A Query

Nov 5, 2006

Hi all,
New to the board and access (2000)

I have been tasked w/ creating a database to schedule and track incoming cases for my job (Dental Lab)

This entire thing is new to me but have developed most of it through reading this forum so thanks for that!
I still have a long way to go...

Here is what I am stuck on -
I have a table of technicians
here you can add the first name, last name, and department (The department is coming from another table called department)

These are working fine,

Now I have a table for the doctors to fill out a form to initiate a new case,
In this table I have a field called techassigned1 which pulls from a query of the technician table where the deptmant is set to plaster bench.

This works fine - I get a dropdown box with the technicians name that is assigned to the plaster bench (This name changes periodically)

But All I want is for that 1 name to be set as a default value - I need it in the table so I know who started the work on the case
I dont want the doctor to have to choose this name

I read in the forum and used
Me!techassign1.DefaultValue = Me!techassign1.ItemData(0)
in the forms ONOpen event

But this is what happens
The form just displays #Name? in the dropdown box but the correct name is under it if I click the arrow
But if I right click and look at the property sheet the name is in the default value property but it still doesnt update the techassign1 field in the table.

Is there a way to have this automatically add the technician from the query to the table? without haveing to select it?

Any help is greatly appreciated -
If I am not making sense plese let me know and I will try to explain it better.

View 7 Replies View Related

Combo Box - Default Typing

Nov 30, 2005

Hi all...I have a combo drop down box that has the 50 states in it. I would like the list to pop to the first state that starts with a letter typed in. For exampe, you type 'C', takes you right to CA.

Anyone now how to do this? (silly question )

View 2 Replies View Related







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