Form Entries Leaving Entry Boxes Blank

Sep 6, 2006

I have a form that allows users to search the database for records based on there criteria. The form allows the user to search, through combo boxes, by variables. The first is MAT, the second is Relocation Area. The search works fine when the user selects options form the combo boxes. However sometimes it is neccesary to leave the location field blank and only search by MAT. When the location combo box is left blank no records are found. Is there anyway around this. The SQL code for the query is below:

SELECT [Extract Data].[ID], [Extract Data].AREA, [Extract Data].[MAT], [Extract Data].[Relocation Area 1], [Extract Data].[Relocation Area 2], [Extract Data].[Relocation Area 3], [Extract Data].[Grade Score]
FROM [Extract Data]
WHERE ((([Extract Data].[MAT])>forms![Data Search]!SearchMAT) And (([Extract Data].[Relocation Area 1])=Forms![Data Search]!SearchArea)) Or ((([Extract Data].[MAT])>Forms![Data Search]!SearchMAT) And (([Extract Data].[Relocation Area 2])=Forms![Data Search]!SearchArea)) Or ((([Extract Data].[MAT])>>Forms![Data Search]!SearchMAT) And (([Extract Data].[Relocation Area 3])=Forms![Data Search]!SearchArea));


Any help would be much appreciated
Nick

View Replies


ADVERTISEMENT

How Can I Check For Duplicate Entries After Leaving A Field?

Aug 30, 2005

I'm pretty new to Access, so please overlook any stupid questions :)
I have a data entry form that has one field that cannot be a duplicate. So, in the table I have it Indexed with No duplicates.
The problem is that the form doesn't notify the user that they have entered duplicate information until they close the form. So the 10 minutes they spent filling it out is wasted.
So, after consulting various posts, I did a BeforeUpdate event with the following code:
(the field that must be unique is called "LS Number", in the form "Q and D" based on the table "Q and D Database")


Private Sub LS_Number_BeforeUpdate(Cancel As Integer)
On Error GoTo LS_Number_BeforeUpdate_Err

If (DLookup("[LS Number]", "Q and D Database", "[LS Number]=Forms![Q and D]![LS Number]")) Then
MsgBox "The LS Number you entered already exists. Enter a unique LS Number", vbInformation, "Duplicate LS Number"

End If

LS_Number_BeforeUpdate_Exit:
Exit Sub

LS_Number_BeforeUpdate_Err:
MsgBox Error$
Resume LS_Number_BeforeUpdate_Exit

End Sub


When I test this by entering a duplicate LS Number, it gives me the error "Type Mismatch." Unfortunately, I have no idea what this means, nor do I know how to fix it.

Please help, my head hurts!

View 3 Replies View Related

Criteria In Query Leaving Blank Table

Apr 30, 2007

I am trying set up some criteria for a create table query. I am using multiple fields from different tables, I am trying to delete certain feilds if they meet the criteria. I am using iif([letter c_last]=[letter a_last],null,[letter c_last]) in the criteria for letter c last, but when I run it a box appears to enter criteria for the last name field? I want it to look at the field not for data to be entered manually. I hope this makes sense. Any help would be greatly appreciated.

View 1 Replies View Related

Help Needed Please: Date Parameter In Query - Leaving Blank To Include All Records??

Aug 9, 2007

Hi

Bit of an Access beginner and am trying to sort something out for work - not sure why they've asked me!

I've created a query to search on a couple of items using drop down boxes on a search form I created. This bit of it works fine, I used this site http://www.fontstuff.com/access/acctut08.htm and copied what he had done. This is fine.

I now want to add a date search to the same query. I know I can use Between [..] AND [..] but if I leave the boxes blank it finds no records. I'd like it to search and include all.
Ideally I want to include 2 extra text boxes on my form that I can put a to and from date in (or not put a date in and it find everything).

Hope that makes sense, please can someone do me an idiots guide?

Many thanks
Phil

View 5 Replies View Related

Data Entry Using Blank Form?

Apr 6, 2005

I have searched the forum and asked some of my colleagues about this and I do not seem to be getting anywhere. :(

What I need is to be able to use a (blank, ie showing no current records) form to enter data into a new record.

I have Tables A and B in a 1-to-many relationship and I need to be able to bring up a blank form which has:

1. a combo box, allowing me to select the relevant record from the parent (table A), and ...
2. blank fields (from the child - table B) to fill in with new data.

I can set this up using a standard setup, where all records are shown, but this is confusing to a dumb user, who really only wants to see relevant boxes for them to fill in without the distractions of data in fields they are not concerned with or with other records they do not want to know about.

Can anyone help? :)

View 2 Replies View Related

Retrieve Blank Form Upon Record Entry

Jul 12, 2013

I have code that is executed with the click of a button to enter a new response using 2 fields to differentiate the records: a combobox "cboSrvID" and a textbox "RspnsName". I have a different set of questions for each value in the cboSrvID. Upon selecting my button the record is saved correctly although I would like it to open the blank form associated on the subform "sfrmSurveyResponses" when pushed. I have tried some DoCmd.FindRecord and DoCmd. GoTo functions to try and retrieve the last acLast RspnsID inputted. So far I have had no luck.

Below is the code for the onClick action of my button.

Code:
Private Sub cmdEnterResults_Click()
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.SetWarnings False
DoCmd.OpenQuery "qappNewResponses"
Me![sfrmResponses].Requery
End Sub

View 2 Replies View Related

Blank Combo Boxes Used For Form Selection

May 23, 2006

Hi All,

Am using a number of combo boxes as selection criteria for a report. The combo boxes are linked to a table, obviously there will be times when no criteria is required and will want to select "ALL" when left blank.

Is there a simple solution ?

Cheers

View 2 Replies View Related

Forms :: Create A Data Entry Form To Order Table Using 2 Cascading Combo Boxes

Jan 31, 2014

What I am trying to do is create a data entry form to an "order table" using 2 cascading combo boxes. I have created a data entry form based on a query. I can't get the cascading combo boxes to work properly.Here is the code:

Private Sub Combo0_AfterUpdate()
Combo2.RowSource = "SELECT L2_ID,L4_Element_name,L5_Category FROM qry_ord WHERE L3_ID = Combo0.Value;"
Combo2.DefaultValue = [Combo2].[ItemData](0)
Command4.SetFocus
End Sub

[code]....

View 2 Replies View Related

Reports :: Table With Several Entries - Merge Non Blank Records

Jun 24, 2013

I have a report that is derived from a table (tblDocs) the structure of the table is:

EmpId docType docDate comments
(number) (number) (Date) (text)

This table will have several entries for each employee. There will only be a few times that a comment will be entered. On my report, I will have a field for the comments and I would like ALL of the comments for each employee combined into one text box in the report There will be blank entries in most of the records). I think the control source for this might be a query, but not sure. I set the properties of the text box to can grow.

View 3 Replies View Related

Show Latest Entry Of Multiple Entries

May 25, 2005

I am trying to customize one of my query table, so that it shows the latest review date of an employee (with multiple entries). I have gotten the SQL statement to work so that it shows the latest employee review date which is greater than the current date. But if the employee has 2 records after the current date and I want it to show the latest entry of the 2. I don't know to put add a sub-Select statement or whether to add another criteria in the Where criteria.





e.g. Current Date = May 25, 2005If Employee A's next review date is set for June 1, 2005 but has already been reviewed (the next review date is May 31, 2006). The query will show the June 1, 2005 and not the latest entry of May 31, 2006.


Because there are 2 review dates that are after the current date. What should I do to make only the latest entry appear?


Below is the my VBA code so far, which produces the above result.



SELECT tblEmp.fname, tblEmp.lname, tblEmpWorkHistory.[current store], tblEmp.position, tblEmpSalaryHistory.salary, tblEmpSalaryHistory.next_review_date
FROM (tblEmp INNER JOIN tblEmpSalaryHistory ON tblEmp.ssn=tblEmpSalaryHistory.ssn) LEFT JOIN tblEmpWorkHistory ON tblEmp.ssn=tblEmpWorkHistory.ssn
WHERE (((tblEmpSalaryHistory.next_review_date)>Now() And (tblEmpSalaryHistory.next_review_date)<=[Please enter the Next Review Date]))
ORDER BY tblEmpSalaryHistory.next_review_date;

My brain is stuck and can't figure it out. I hope any fresh mind could help me out. Thanks in advance.

View 5 Replies View Related

Require Field Entry To Be One Of Entries In A Table? Validation?)

Oct 29, 2004

I am using Access 2002 database with ASP.NET(VB). I usually try to get something working in the access 2002 GUI 1st and I am having trouble with creating the code to require that a field entry be forced to be another exisiting entry in another table. For Example:

UNIT_TABLE has fields UNIT_ID(key), and UNIT_NAME having values of:
1 Tigers
2 Bears
3 Sparrows

BATTLES_TABLE has fields BATTLES_ID(key), ATTACKER_MAIN, and DEFENDER_MAIN


I want the ATTACKER_MAIN and DEFENDER_MAIN choices to ONLY be members from UNIT_TABLE.UNIT_NAME

I set up a combobox and lookup in BATTLES_TABLE as follows:
SELECT UNIT_TABLE.UNIT_NAME FROM UNIT_TABLE ORDER BY UNIT_TABLE.UNIT_NAME;

this OFFERS the CHOICE of any of the 3 clans (ie Tigers, Bears, Sparrows)

but I cannot not FORCE the USE of these....because the end user can option to enter in anything else.(which is not wanted).

How do I add SQL to the LOOKUP such that... the user can ONLY choose to enter text that EXACTLY matches an Already existing entry in the UNIT_NAME field?

I tried to enter a validation rule:
[ATTACKER_MAIN] In ([UNIT_TABLE.UNIT_NAME])

I get an error that the field 'UNIT_TABLE.UNIT_NAME' does not exist.

Thanks for any help with this validation problem.
HKP_MACK

View 3 Replies View Related

General :: Setting Default Value For New Entries As Previous Entry

Jan 17, 2013

Is there a method of setting the default value for new entries to the same value as the previous entry?

For example, I have a quality control information table that stores QC data for different lot numbers. It is annoying to enter in the lot number and product code field over and over again if there are dozens of records per lot number. Is there a way for Access to easily display the previous entry as the default value?

View 1 Replies View Related

Automatically Add Entry For Associate If No Entries For That Month Exist?

Sep 28, 2015

I have a database that is tracking attendance for several 100 employees. The Db is mainly used to log any policy occurrences (no call, no show). If an associate doesn't have any occurrences for a month, then they get a point credit. Right now, I set it up so the credit can be manually added. the problem is a supervisor (the user) may not know if their associate should receive this credit unless they review their attendance report. Opening the form to add a policy occurrence, then running a report to only re-open the same attendance form is inefficient. What I'd like to have is a way to have a credit automatically added if they did not receive any points for a particular month.

ps. My office does not allow uploading any data/files so I am not able to upload a copy/sample.

View 4 Replies View Related

Queries :: Multiple Entries For Same Date - Merge Data Into One Entry

Oct 24, 2014

Right now i have a qry that takes ID - Name - Order - RepeatOrder - Month - Department.

Now when i run the qry what i want is a grand total of Order/Repeat Order by Name for the Month, what is happening is the qry is creating multiple entries for different departments. I even have Department "Group by" but still causing the issue, For example:

For APR:

4/1/14 Dep A 12 2
4/1/14 Dep B 10 2

However i do not want them separated, how to i merge the data into 1 entry? 4/1/14 22 4?

View 1 Replies View Related

Combo Boxes And Duplicate Entries

Aug 17, 2005

Hello

I am trying to get a 2nd combo working from the first .

I have a table called Keystage (tblKeystage) and I have also named my 1st combo cboKeystage. then by following the vba below I created another 6 tables with corresponding names and combo's.

Private Sub cboKeystage_AfterUpdate()

On Error Resume Next

Select Case cboKeystage.Value
Case "Foundation"
cboYear.RowSource = "tblFoundation"
Case "KS1"
cboYear.RowSource = "tblKSOne"
Case "KS2"
cboYear.RowSource = "tblKSTwo"
Case "KS3"
cboYear.RowSource = "tblKSThree"
Case "KS4"
cboYear.RowSource = "tblKSFour"
Case "Post16"
cboYear.RowSource = "tblPost"

End Select

End Sub

The combo boxes both work, brilliant. My problem is that when I enter another record and make a selection from the 1st combo box, it changes all the records.

Could somebody please help.
Thanks
Wong

View 3 Replies View Related

Updating Entries In Combo Boxes

Jan 26, 2015

I have two tables and their associated forms. Agent Firm and Agent Person. I have created a one (Agent Firm) to many (Agent Person) relationship because a Firm can have many Persons (not vice versa).

I have also created a combo box autofill so that some of the information from the Agent Firm can be posted on the Agent Person.

Query one: I tried using text for the AutoFirm ID because each firm's name is unique. However, when I tried to see what happened if the firm changed its name, still having a unique value, I was not allowed to. Why? and can I over-rule this? For the time being I have used an autonumber as an ID, but I feel that is inefficient.

Query two: I have set up a combo-box, which works, using the following:

Private Sub cboAgentFirmID_Change()
Me.txtAddress1.Value = Me.cboAgentFirmID.Column(2)
Me.txtAddress2.Value = Me.cboAgentFirmID.Column(3)
Me.txtAddress3.Value = Me.cboAgentFirmID.Column(4)
Me.txtTown.Value = Me.cboAgentFirmID.Column(5)
Me.txtPostcode.Value = Me.cboAgentFirmID.Column(6)
End Sub

I originally had a first line Me.txtAgentFirm.Value = Me.cboAgentFirmID.Column(1) but deleted it because the AgentFirm is being entered in the AgentFirmID box (why??)

AgentFirmID, which is the autonumber primary key (see query 1) in Agent Firm is the link between the two tables in the relationship.

Query three: A major feature should be that if an AgentFirm changes its name, or address, phone number, etc this is reflected immediately across all related entries. And it does not happen: each one has be updated manually.

(Imagine if a bank changed its name and had to alter each account manually!) How do I make it work as I am sure it is meant to?

View 13 Replies View Related

Forms :: Combo Box With Blank Entry

Aug 7, 2013

I have created a form that searches through one of my tables, via a query, it then automatically creates a report from that query.

I want to add an option into the combo box's that is blank.

Currently if you wanted to choose by 'fault category' but accidently click on 'failure analysis', it will take the top value of the combo as the entry, you can't then blank 'failure analysis'.

Each combo box gets its information from an independent table.

The only think I figured out what adding the refresh button which just closes then reopens the form so all the fields go blank.

View 14 Replies View Related

Required Entry If Check Box Is Blank

Aug 22, 2013

I have a lot of fields that I want to make required entry only if one of the check boxes I have is blank. If the check box is blank then I don't want any entries to be required.

For example, I have a form that needs to be filled out only if a machine is running, if the machine is not running then only certain fields need to be filled out and the user will select the check box labeled "Machine not running".

BTW, I'm very new to Access and have no experience with implementing code, other than with excel.

View 5 Replies View Related

Subform Data Entry Problem Blank Line

Jul 7, 2005

I have a main form where the user chooses a BoxID. There is a subform on this main form that has a relationship between BoxID on the main form and subform. The users are entering data in the subform and when they have entered 10 lines of info I have a message that tells them to start a new box (I could not work out how to do it any other way as I lack VB skills). The user closes the form or clicks add new record to create a new box. If I view the previous record there should only be 10 lines of information in the subform but there are 11 as it takes the blank line as a new record....

View 8 Replies View Related

Queries :: Search Not Returning Results With A Blank Entry

Oct 25, 2013

I have a switchboard which runs a google style search query to find people based on their first name, surname, date of birth or NI number on clicking the search button. It uses the following criteria in the query Like "*" & [Forms]![SearchF]![Firstname] & "*" for each of the above fields.

This works perfectly until someone inputs a record that doesn't have anything in one of the fields. ie, full name and DoB, but no NI number. When a record is entered in this way, the table stores the record but the search query cannot find it.

View 3 Replies View Related

Forms :: Mandatory Entry Message If Field Blank

May 11, 2014

How to have a message appear if the "Symbol_Stock" field is blank.

View 14 Replies View Related

Forms :: Way To Continue To Blank Form After Entering Information Into Previous Blank Form?

Mar 25, 2013

When entering information into a blank form, I would like to be able to continue entering information to another additional blank form after my last entry. Is there a way to continue to a blank form after entering information into the previous blank form? I would just like to continue without having to close the entire form and then reopening another form.

View 7 Replies View Related

Multiple Combo / List Boxes - Sort Based On Entries

Sep 23, 2013

I am trying to put together a form where employees will be entering maintenance information into my database. One of the requirements for this data is that when they perform repair work on an asset, they have to list a problem, cause and remedy. These are codes that are specific to each asset.

The closest thing I can think of to what I am trying to acheive is the selectors on car search websites. You select a MAKE, and then the MODEL list is narrowed down based on that, then you pick the TRIM, which is narrowed down based on the model selection. I have an Excel spreadsheet of the Assets(Failure Class), Problems, Causes, and Remedies...I'm just not sure how to put this into Access to get the desired output. I have attached a sample of the Excel spreadsheet for illustration.

I believe I'm going to have to put each of the columns in a seperate table and use relationships..but I'm not sure about that.

View 2 Replies View Related

Forms :: Blank Data Entry Page But With A Populated Field?

Jun 19, 2013

I have a form, combo box selection, when i make a selection, all the info is good on all my tabs, which holds the subform.My issue is, on one of the subform, it's a data entry form, where I want it to be on a new record page. instead it list all records. I want my users to see a blank page, but have one field populated. is this possible?

1) blank data entry page, but with a populated field?When a CU Name is selected,I want the (Enter Note) tab to go to a data entry or last page or new page.I have tried putting it to data entry form, but the CU Number will not populate.

View 1 Replies View Related

General :: Access Closes - Reopen With Blank Message Boxes

Jan 23, 2014

Every time I re-open Access 2010 it pops up stating the following with a blank text box:

"[Forms]![Frm_system]![sub_frm_invoices].[form]![invoice_id"

I hit ok and the usual invoice_id param text box message box appears again.

Once that is over, I gain access. I can browse to the form - frm_system, open the sub-form sub_frm_invoices and remove the invoice_id field. Once I re-add it everything works fine (until I close the application).

I initially thought it was because the database was set to "compact on close" but I disabled that and it is still occuring .

I know this is the cause but as the sub-form itself uses a table record-source I know the field exists - not to mention I can simply delete and re-add it to fix it temporarily.

This behavior occurs when a field, a criteria, an expression, or a control in a query, a form, or a report references a name that Access cannot find. For example, a name could be misspelled or a field may not be available within that scope.

Basically it looks like the textbox displaying the invoice_id on the form is the problem. I can't figure out why though. When I remove it everything works - the queries work if I recreate it as well..

View 1 Replies View Related

Forms :: Limit Data Entry To One Of Four Available Combo Boxes

Apr 29, 2015

I have a form with four combo boxes on it, the four boxes all open the same form and return a record based on the selection from a different column from the same query.

To make it work smoothly I think I need to make it so it is only possible to enter data in one combo box at a time. I could also do with some error handling.

View 2 Replies View Related







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