Forms :: Deleting ComboBox Lookup Options But Keep Old Records

May 14, 2014

I have a ComboBox which looks up the records in a query. The query contains the names of current employees. The table upon which the query is based lists Employees and their start date and finish date. The Query is based on finish date being Null (ie they're still working here).

In the main form which details tasks, I would like the ComboBox to just list current employees (which it does as it's based on the query) but when an employee leaves, their name is deleted from all previous records.

Is there a way to keep the ComboBox options limited to current staff, while also keeping the names of previous employees in the form?

I checked the table which the form is based on and it still has the values, so I'd like to show in the form too as that's what people will be working on.

View Replies


ADVERTISEMENT

Forms :: Cascading Combobox To Filter Options That Can Be Entered Into Second Combo Box

Jul 31, 2014

I'm trying to use a cascading combo box to filter the options that can be entered into a second combo box.

In frmBabies, a Mode of Delivery is selected from 8 options. 4 of these are "normal" deliveries and 4 are caesarean sections.

A second combo box selects the Indication for Operative Delivery. The table tblIndOpDel contains options for normal as well as caesareans. I would like to filter the indications so that the user cannot enter an indication for normal delivery for a caesarean section.

Both tblIndOpDel and tblDelMode have a foreign key to tblDelModeCat, which categories deliveries as normal or caesarean.

I'm stuck on how to proceed from here. Sample database attached.

View 2 Replies View Related

Forms :: Combobox To Lookup Any Part Of Field

Jun 6, 2013

I am using a combobox to lookup contact names.

The rowsource is taken from a field in a contact table that contains the contact's First name and then Last name.
You could use the dropdown to pick the name or type the First name into the combobox.

The problem is that the combobox matches only the beginning part of the field as you type. So if you start typing the person's last name, the combobox would not display anything.

Is there an easy way to allow the combobox to lookup any part of the field that matches the text being typed?

View 13 Replies View Related

General :: Multivalued Lookup - Add Value Options?

Jan 31, 2015

How I can create a Multivalued Lookup however with an add values option?

View 8 Replies View Related

Filter Query Combobox Options

May 11, 2015

I created a form that has about 8 different filter options that can be used to filter a query. I used the filter by form table to set it all up and I can get each of them to work individually as well as 2 work together... but as soon as I added the information for the 3rd, I stopped getting results... in fact nothing happens. Even with the code for all 3 and selecting just 1 option, nothing happens any more. I have

cbopersonnel that is supposed to look up values in 4 different personnel columns
cboshift that looks up all shift work
cboworkdef that looks up what the job was (just a title)

Having just 2 in the filter by form works great, but adding 3 screws everything up. And I'm not talking about selecting all three (I know that would limit the output more) but I mean, with all 3 setup and selecting shift as "nights"... nothing gets filtered anymore. I have cbopersonnel on "look for" tab and everything else is on the next "or" tab. I tried to set it up on individual tabs but access combined it. I also tried adding cboshift to the "or" tab with everything else and access sent it back to "look for". All of the cbo references are under their respective search area... so in the table, the shift column has the cboshift lookup value. Is it just because I'm not using quotes around the cbo output? That doesn't make sense to me though. Anyway below is the lookup value for the cboshift.

[Forms]![Log Book Lookup]![cboshift]

View 2 Replies View Related

Forms :: Delete Button Deleting Too Many Records

Aug 8, 2013

I have a columnar form with a sub-form based on an updatable query. I've created a delete button on the master form with the intention that if the user hits the delete button, it will delete the current record (like its supposed to, right?).

But what is happening is when the delete button is hit, it is asking twice for deletion confirmation and deleting the current record AND the next record. Even if I hit "Cancel" to stop the deletion, it still deletes the current and next records.

Each record has a primary unique ID that is included on the form (but not tab stopped - if that makes any difference), but it doesn't seem to be using that as the basis for deleting.

I've tried two different codes for this:

Private Sub Command110_Click()
On Error GoTo Err_Command110_Click
DoCmd.RunCommand acCmdDeleteRecord
Exit_Command110_Click:

[Code] .....

View 3 Replies View Related

Forms :: Deleting Records On The Table Through Form

Oct 12, 2014

I have a form linked to a table and in my form there is a listbox reflecting the records in my table. Evereytime I tick a record in the list box the information on its corresponding columns appears on the text field.

So far I am able to add, modify and save record to my table using this form but I am having a problem on deleting a record which I selected on the listbox. I created a delete command button but it is not working. Please see attached database.

View 2 Replies View Related

Deleting A Selection From A Combobox

Dec 6, 2006

hi,

has any1 got any examples i can look at for the following:


A delete button that deletes the item selected in the combobox



i need it urgently???????please

or even any code!!!!

View 2 Replies View Related

Forms :: Populating Records From A Choice In Lookup

Jun 14, 2013

When adding a new project to the DB (through forms, not tables) when we get to the Client Company, I have a look up menu for previous clients (many of which will be reused) and when I click on the company, I would like the information to auto populate the client company info (address, city, state, phone, etc.) form. The whole point of the look up is to not have to re-enter information for the same company over and over. However, if there is a new client company I will be able to fill that info in myself to be added to the table.

View 4 Replies View Related

Deleting All Related Sub Records When Deleting The "main" Record.

Apr 12, 2008

I have two tables.

1. Persons (list of persons)
2. Job history (list of jobs)

each person have their own job history. all these jobs are stored in the job history table. when i delete a person i would like the job history for this person deleted as well. each job stored in the job table have a field with person name, so that it is linked to this person.

how can i do this? vba or simple properties options?

- Roy

View 1 Replies View Related

Forms :: Using ComboBox To Filter Records

Jan 14, 2015

I am using Access 2010, Windows 7

I have an unbound form with a combo box and a bound subform on it.

I am using the combo box to get a value to filter (and display) records in the subform.

My code is:

Private Sub cboSessions_AfterUpdate()
On Error GoTo cboSessions_AfterUpdate_Err
Me.SSubform.Visible = True 'subform was initially invisible
Me.SSubform.Form.FilterOn = True
Me.SSubform.Form.Filter = "[LinkID]=" & Me.cboSessions
Me.SSubform.Form.Requery
cboSessions_AfterUpdate_Exit:
Exit Sub
cboSessions_AfterUpdate_Err:
MsgBox Err.Description, vbCritical, "PROGRAM ERROR"
Resume cboSessions_AfterUpdate_Exit
End Sub

The subform is initially invisible to stop it showing all records.

This works fine AFTER the first selection(!) - the first Update of the Combo Box just doesn't filter the subform??

I have tried putting code in the main form's On Load Event - allocating a value to the Combo Box and running cboSessions_AfterUpdate but that does not work either.

View 1 Replies View Related

Forms :: Retrieve Records Based On Combobox

Jun 25, 2013

I have two Tables, "staff data" (staffID, name) and "issues log" (IssueID, StaffID, 20+ fields about individual Issues). StaffIDs are linked together so each employee can have multiple issues..I have (so far) Form1 containing individual Issues that can be filled in, or retrieved one at a time / scrolled through in IssueID order

What I want is a second form, containing a combobox with all StaffIDs (+ names) listed; when a StaffID is selected, a table is loaded containing all Issues for that employee. When any of these is selected, Form1 is loaded

I have created the second form, including the combo that contains both StaffIDs and Names. I can't yet grasp how to show the set of Issues applicable to that employee when I change that combo...If I could have the combo on Form.

View 2 Replies View Related

Lookup Associated Fields With CourseNumber Selected From Combobox

Sep 15, 2011

I am new to access. I have the following code to lookup associated fields with a CourseNumber that is selected from a combobox. The information is then stored in a CourseEnrollment table linked to student info.

The CourseNumber and associated fields are located in a LU_CoursesOffered table. The LU_Courses Offered table has been populated by choosing associated data from combo boxes based on other LU tables.

I am getting the primary keys returned for the associated data rather than the text stored with that key.

Private Sub Combo103_AfterUpdate()
CourseName = DLookup("CourseName", "LU_CoursesOffered", "CollegCourseNum = " & Nz([CollegeCourseNum], 0))
LevelSection = DLookup("LevelSection", "LU_CoursesOffered", "CollegeCourseNum = " & Nz([CollegeCourseNum], 0))
AcadGrad = DLookup("AcadGrad", "LU_CoursesOffered", "CollegeCourseNum = " & Nz([CollegeCourseNum], 0))
Instructor = DLookup("Instructor", "LU_CoursesOffered", "CollegeCourseNum = " & Nz([CollegeCourseNum], 0))
End Sub

View 3 Replies View Related

Tables :: Requery Combobox Lookup On Table Datasheet

Feb 20, 2014

When designing a table I've created a field and set its lookup properties to display a combobox with a row source that returns a DISTINCT set of values already entered into the field.

After a row insert or row update the combobox needs to be required to ensure its list is complete.

If I create a form to display my datasheet this is easy. But I'd prefer to enter data directly into the table datasheet directly. I need to enter simple data into about 20 different tables and I'd prefer not to create 20 forms unless it's really necessary.

The lookup wizard generated entries similar to those I'd previously created manually, except the wizard generated a couple of extra settings that appeared briefly that were not part of the regular set of lookup tab properties. These additional settings referred to 'update propagation'. Once they'd disappeared I couldn't see any way to get them back..

(I am using Access 2013)

View 3 Replies View Related

Modules & VBA :: Wildcard Search Of Combobox - Lookup Values In Table Column

Nov 19, 2014

I have a form which has a combobox called Task_Ref which looks up values in a table column.

I would like to be able to set the tickbox value of tickbox called P1 to True if the combobox contains the word "test", each entry on the combobox selection may vary such as:-

Test number 1
Yesterdays Test

As long as the word "Test" appears I would like the above to happen?

I was thinking of something along the lines of:-

If InStr(Task_Ref.Value, "Test") > 0 Then
P1.Value = True
Else
P1.Value = False
End If
End Sub

But this hasn't worked

View 4 Replies View Related

General :: Lookup Combobox - Field Show Number Instead Of Text In Listbox

Jul 7, 2014

I have a field in a table where it is a lookup is a combo box. So this makes the data type of the field a number when in reality it is a text. When I have this field show in a list box it shows the number instead of the text.

View 5 Replies View Related

Forms :: Update Row-source Of Combobox Based On Value Selected On Another ComboBox?

Apr 26, 2015

I am trying to use a combobox called Manufacturer to select which table the combobox called Model gets it's rowsource from using the code below.

Code:

Private Sub Manufacturer_AfterUpdate()
If (Me.Manufacturer.Value = "Siemens") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SeimensTable"
Me.Model.RowSource = "SELECT Model FROM SeimensTable"
Else
If (Me.Manufacturer.Value = "Samsung") Then
Me.Model.RowSourceType = "Table/Query"
Me.Model.Recordset = "SamsungTable"
Me.Model.RowSource = "SELECT Model FROM SamsungTable"
End If
End If
End Sub

But when I run the form and select Manufacturer. Combobox Model remains empty. tell me what I'm doing wrong?

View 5 Replies View Related

Deleting Records

Aug 4, 2005

I have two tables (same data but slightly different attribute structure) with a one-to-one relationship (the join field is "ID"). There are 69 matching records in these tables. How can I delete these matching records from table A, while leaving them alone in table B?

I'm confused because I brought both tables into a select query, created a join from ID to ID (within in the query's design view), and then added all fields from table A to the query. I then ran the select query and saw the 69 records from table A in the query's data view that I wanted to delete, highlighted all records and clicked delete. However, this action deleted the 69 matching records from TABLE B, not Table A!!! How is this possible? What should I do instead? Thanks.

View 3 Replies View Related

Deleting Records

Nov 11, 2005

A strange request but I hope someone can help with this one

I have a table (tbl_Econ) where I have to delete a specified number of records from a table. It does not matter which records as long as I delete the exact number

e.g On a form text box I enter the number or records to be deleted (e.g.6000).

The table (tbl_Econ) has 8000 records, so I have to delete 6000 records. I need to be able to do this automatically :eek:

View 1 Replies View Related

Deleting Records

Feb 1, 2006

How can I go about deleting records fully? So that there autonumber, etc can be used again without access moaning.

Thanks :D

View 1 Replies View Related

Deleting Records

Mar 14, 2006

I have a query (Query1) which returns results In one field recordID.

How do I delete records in a table where the RecordID is in the list Query1.recordID?

Thanks

View 4 Replies View Related

Deleting Records

Jan 25, 2008

Hi,

how would i go about deleting a set of records? i can get a list of records together in a query taken from 4 tables and would need to, if necessary, delete a single line. not all information needs to be deleted from all 4 tables though? the info to be deleted would only be deleted from 1 or 2 tables being the last 2 in the relationship.

i guessed it might be an append query but im not too familiar with them.

any chance of a possible suggestion?

many thanks,

NS

View 2 Replies View Related

Deleting Records

Oct 17, 2007

I am having trouble with my autonumbers when i have to delete a record.

Can anyone help me out with auto numbers?

View 9 Replies View Related

Deleting Certain Records Using SQL

Dec 14, 2006

Hi there, i have a master reset to delete all the data in the database. Although, as there is a username and password entry to get into the admin module, i wish for one entry in the table participantTable to not get deleted (to save one password/username so its possible to log into the admin module after the reset). The code below will delete everything, how can i change it so it keeps the first record in the table, and then deletes all the other records after.

DoCmd.RunSQL "DELETE * from participantTable"

Thanks in advance

View 1 Replies View Related

Deleting Records And Autonumber ??

Jan 25, 2006

quick question guys...

if i have a sales order that the sales order # is an autonumber and i manually delete the records my next new record still follows the last number i had before that is now deleted..

example

sales order 1001
sales order 1002

if i delete all the records on the table and clean it all out

the next new autonumber will be 1003...

i want it to be 1001 again...
and yes its set to an index of no dups

View 1 Replies View Related

Deleting Records And A One To One Relationship.

Mar 19, 2007

Hello all,

I have 3 tables:
1. customer
2. DVD collection
3. Borrow

The aim of this system is to create a home borrowing system.

The customer table has a one to many relationship with the borrow table, while the dvd collection has a one to one with borrow. I can create a new book with no problem, and even view these on a form. Here my proble arises.

I ahve another form to return a DVD. I view the records from the borrow table, and once found what i want there is a button which deletes the record from the borrow table. Sadly, when i press this button, not only does it delete the record in the borrow table, but it will also delete the record from the DVD collection table.

I have tried everything i can think of, and i don't want to change to change the design as i have found this mnethod very easy to generate reports and the like. Any help??

Thanks

EDIT: the button i used was from the wizard that comes up when you create a button.

View 2 Replies View Related







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