Query By Form Not Working

Oct 15, 2006

I posted a thread on here a few weeks ago about dynamic queries. I was recommended to use Query By Form. So I went to the Microsoft website, followed the instructions, but now it's not working. The query is returning ALL of the table records, no matter how many fields I fill in (or what I fill them in with). I think something may be wrong with the Query criteria, but I typed it just like the site said. If anyone has experience with this, any ideas what I'm doing wrong?

Form has 15 fields (all are related to a field in the table). 3 are combo boxes, the others are textboxes.

Here is the directions I used: http://support.microsoft.com/kb/209645/en-us

View Replies


ADVERTISEMENT

Duplicate Record Command Button Not Working For One Form But Is Working For Other Form

Jan 15, 2015

I have an Access 2010 database with two tables and two forms. The tables are Organizations and People. Similarly, the forms are Organizations Entry Form and PeopleEntryForm. The People are linked to the Organizations table. Several people can be linked to the same organization.On my Organizations EntryForm, I created a command button to duplicate a record using the wizard. It works fine.

I did exactly the same thing on the PeopleEntryForm, but instead of copying the record, it creates a new blank record. I don't get any error messages. Is my problem due to the fact that the People table is linked to the Organizations table?

View 13 Replies View Related

Simple Query/Form Not Working...

Oct 5, 2006

I have a table filled with computer monitor information (tblMonitorManagement). I had query that uses combo boxes (cboSerialNo, cboRoom, cboDepartment) on a form for search parameters. The query is called qryMonitorManagement_Sub. The results are displayed in a subform (frmMonitorManagement_Sub). This works for both my desktop and also my laptop based forms/queries/tables.

Although this form works when using cboRoom and cboDepartment, it does not work when using cboSerialNo, so I decided to simplify it down to get to the root of the problem...here's what I did.

I created a new form, created a combo box (again called cboSerialNo), and had it look up the serial numbers in tblMonitors. Simple.

I created a query called qryMonitors_Test, added all fields from tblMonitors (not using the * option). I then set the SerialNo field criteria to the contents of the cboSerialNo on the new form. Simple. For now I'm ignoring searching on anything else.

I ran the query with no search parameters before I added the criteria, and it obviously displayed all the records in tblMonitors. Fine.

After adding the criteria (using Build...to prevent typos), I used the form to select a serial number, run the query and get no results returned.

If I copy and paste the same serial number and change the SerialNo criteria in the query to search for that it works fine. As soon as I tell it to search for the combo box contents it returns no data.

This is driving me completely bat-poo. It's nothing I've not done a squillion time before but it just refuses to work. I've got to assume it's a query issue as opposed to a form issue, but things don't get much simpler than this should be!

View 6 Replies View Related

Query Not Working Thru A Combo On Form

Aug 4, 2006

I have document management system for 2 projects in one db. I have a login form where user has to select the project id thru a combobox. And I have all the queries based on this combobox to display results in form or report. But after login and selecting the project, login form closes and main form opens to display data pertaining to that project. But it does not work, the moment we click close to open main form again query method apears displaying the same string :[Forms]![frmLogon]![Project]. This happens for all forms, reports. I cant't figure this out. Can somebody please help me?

View 2 Replies View Related

Query A Table Using Multiple Values In Textbox On A Form - Not Working

Aug 7, 2013

I have a database in Microsoft access 2010. The database has a table that stores prospective customer records, and a form that is used to input a search criteria(s) via textboxes, which then queries prospective customers table and returns the records that contain the inputted search criteria(s).

An Example of Textboxes values on the search criteria form:
Textbox - name: bob
Textbox - address: Left blank
Textbox - category: car,boat,truck

I Have tried creating a query with the following

field: name
criteria: like “*” & name & “*”
field: address
criteria: like “*” & address & “*”
field: category
criteria: like “*” & category & “*”

SQL code:
SELECT customerName ,address,category
FROM prospectiveCustomers
WHERE customerName LIKE “*” & name & “*” AND address LIKE “*” & address& “*” AND category LIKE “*” & category& “*”;

That works, but only for one value in a textbox. Once there is more than one value in a textbox (e.g name: bob,smith), the query returns no records.

I have also tried splitting the values using the comma as a delimmter, then inserting the values into a new table. That is fine until one of the search criteria textboxes has been left blank. So the query I created will run, but returns no records.

SQL CODE:
SELECT prospectiveCustomers.name, prospectiveCustomers.address,prospectiveCustomers. category
FROM prospectiveCustomers, [SearchCriteria-name], [SearchCriteria-address],[SearchCriteria-category]
WHERE prospectiveCustomers.name Like [SearchCriteria-name].name AND prospectiveCustomers.address LIKE [SearchCriteria-address].address AND prospectiveCustomers.category LIKE [SearchCriteria-address].category;

View 2 Replies View Related

Queries :: Query By Form With Check Boxes / Combo Boxes Not Working

Mar 25, 2013

Attached I have a database that I've been working on which has a form called "frmCriteriaSearch". It is based off of the qryCriteriaListBoxUpdate query. I am trying to get the listbox in the second tab of the results section to work. It queries fine for the checkboxes, but I cannot get the comboboxes to affect the query (unless a checkbox has already been selected)

View 6 Replies View Related

Sub Form Not Working?

Mar 11, 2005

Guys I have just been asked to take a look at an old DB that I did ages ago.
The problem relates to the Suppliers Form. It has a SubForm SupplierContacts.

The user can enter a supplier contact name for the supplier account being viewed. If they navigate away from the record and then back the Supplier Contact form is blank? I can't see why this is happening. Been playing around for a while now but still can't see it?

Master / Child Link is OK: SupplierID to SupplierID

The record exists within the main table (tblSupplierContacts)

Any ideas?
Cheers,
Phil.

View 1 Replies View Related

Sub Form Not Working As I'd Like

Jan 18, 2006

Hi,
I have a sub form (courses). which isn't displaying the information that i have previously entered into it for a particular record.

i.e. I have an appointments system where the my main form 'Tutors' links to a 'courses' sub form. I can enter info into the courses form through the tutors form but when i close it and then reopen at a later time the information for courses isn't displayed for the record which i had previously entered it for. (it is in the courses table though, i've checked).

Any help would be much appreciated.:confused:

Jonathan

View 1 Replies View Related

Query Not Working...

Jan 30, 2007

Hi,

I hope someone is able to help me. I've been working on this for days. I have a report which has a 2 subreports in it. I have the subreport bound and have a query working in the recordsource. Here is the recordsource:

SELECT [Casual Roster Information].ID, [Casual Jobs/Dates].LinkID, Sponsors.SponsorID

I have one report with the Master/Child fields filled in and set but the sponsors subform I cannot fill in the Child field. It says I need to put SponsorID in the recordsource. I thought I did have this(see above.) That's my first problem.

My bigger problem which I think the previous problem is contributing too is my subreport shows up blank. When I run my query it works perfect. But, when I run it with the rest of the program the subreport shows up blank.

Anyone know how I can go about fixing this??
Thanks!!
Nick

View 3 Replies View Related

Form Wizard Not Working!

Apr 11, 2006

I am having a problem when trying to use the Form Wizard.

I select a table or query, but it shows no fields! Here is a screenshot:

http://img.photobucket.com/albums/v85/retroap/access.jpg

I am running Office 2003 with the latest updates on XP Professional SP2, again with the latest updates. The install was fresh only about a week ago, and I had only used this install of Access for a few hours before it started doing it!

I have tried creating a totally new database, or using an existing database, and the same happens. This led me to believe it was my Office install. I tried doing a repair through add/remove programs, which successfully repaired Office apparently, yet the problem persists. I even totally removed Office, rebooted, and reinstalled, and tried without updates!

Can anyone suggest what I could try next?

View 5 Replies View Related

Form Code Not Working

Aug 1, 2005

Maybe this should be posted under VBA.... not sure. Havent seen answer that works yet.
Its a form with an option group "PickWO" When you pick an option, different fieilds become visible-non visible. I created a field "PickWOvalue" to store the option value "1" or "2". That part works fine.(visible) The problem is when you reopen the form to view the records the option box value does not show or change the fields visible properties. And the on open cuauses an error. Anyone see the problem?




Private Sub Form_Open(Cancel As Integer)
Me.PickWOvalue.Value = Me.PickWO.Value
End Sub
`````````````````````````````````````
Private Sub PickWO_AfterUpdate()

Call NotVisible

Select Case Me.PickWO

Case Is = 1
Me.ReInspectionDate.Visible = True
Me.Price.Visible = False
Me.WOPreview.Visible = True
Me.PrtWO.Visible = True
Me.WBMInvoice_.Visible = False

Case Is = 2
Me.ReInspectionDate.Visible = False
Me.Price.Visible = True
Me.cmdPreTag.Visible = True
Me.cmdPrtTag.Visible = True
Me.WBMInvoice_.Visible = True


End Select

End Sub

View 6 Replies View Related

Please Help .. Form Not Working As Planned

Aug 30, 2006

Hi group, I am a newbie to Access and VBA programming. My original post was probably not very specific as it was not answered but I really need help on this!

TABLE1 stores a list of serial numbers and a status field (it contains the word Pass or Fail). The NEWSN table is used to capture new input of serial numbers and a field to indicate if the serial number exists in the first table.

The query based continuous form used to enter the new serial number. Upon entry of the new serial number the form requeries to find the match. If a match is found the remaining fields on the form populate correctly. If no match is found the form does not show the input of this serial number, but it does write the new serial number to the NEWSN table.

How can I get it to keep the new serial number showing on the continuous form and insert a statement into the NEWSN table indicating "No Match"?

Any help would be greatly appreciated!

Thanks,
Kerry

View 3 Replies View Related

Help Please! Form And Relationships Not Working

May 8, 2005

Hi- I am trying to create a Registration form for Events and I'm having endless trouble getting it to work.
Basically, I have four tables: Contacts, Registration, Payments, and Events.

I either cannot delete registrations when I need to-I delete a record in the form, but when I reopen it it is there again; or the pmts table is adding blank records.
So when I try to create a query to get a list of registrants, I will get two fields with the same name and Reg Id, and one with a pmt and one without.
I want one record per person registering and Im not getting that in my database.

Most, but not all, people are paying for events. Some people are staff or scholarships.
I want to be able to see just one record for every person who has registered, whether they have paid or not.
Im either seeing two records with the same reg number, or missing people that have not paid.

I have tried all kinds of configurations as far as relationships and Reg form and Im pretty stumped at this point. Any help would be greatly appreciated!

View 1 Replies View Related

Delete Query Not Working

May 12, 2005

Hi all,

I have a problem with a delete query i am trying to set up and hopefully one of you experts can help me out.

I have a table called [PMI] and a table called [Referrals]

The tables have a one to many relationship and are linked by the primary key field Patient_No.

I want to delete all records in [PMI] that have no records in [Referrals] and this is what i'm having problems with. I have created a select query where i can return the records i want to delete but its the removing of them from PMI that i cannot figure out.

Hope that makes sense, all help is greatly appreciated.

Thanks in advance.

View 4 Replies View Related

Update Query Not Working

Aug 2, 2005

Hi all,

I'm sure this is easy to do but for some reason i just cannot get it working. Hopefully someone here can tell me where i'm going wrong.

I have two tables in a database and the have a linking unique field. I want to update a column in one table from a column in another where the linking ID field matches.

Here's what i have at present.


Update Table_1 inner join Table_2 On Table_1.ID = Table_2.ID
Set Table_1.[CHI Number] = [Table_2]![CHI_No]


This is just returning the CHI Number column as blanks instead of what i expected would be the same as Chi_No.

Can anyone shed some light on this for me?

Thanks in advance

View 2 Replies View Related

Date Query Not Working

Aug 18, 2005

SELECT count(Workitem) AS ["Total Workitem"]
FROM qryReport
WHERE qryreport.date >(08/10/2005); 'MM/DD/YYYY

Secondy how do i supply dates dynamically.

View 4 Replies View Related

Very Simple Query Not Working....

Sep 15, 2005

we have a main table for tracking pickups....some of the fields are combo boxes with relationships to other tables....one such relationship is units (ml, gallon, ounce, etc)...in the main table everything works just fine....a user enters the location info, the amount and the corresponding units. thus, an example would be a user picks up something from building X, room 101, 10, Gallons.....the 10 refers to the gallons, the user picked up 10 gallons...

now for the query:
i'm creating a query for which i will base a report on...in query design if i just select the above info everything works fine....it comes out on the report as 5 Gallons....however, what i'd like to do is concatenate the two fields so that they take up less space on the report and are more visibly appealing...here's what i tried in query design:
Amt: [amount]&Space(1)&[units]
this does not work....in the units table that provides Gallons as a selection in the combo field, Gallons has a key value of 5.....thus, when i run the query using the above code i get 10 5 - where 10 is the amount the amount and 5 is the key from the combo box...

i've tried bringing in the units table but then i get a type mismatch....how can i concatenate the two fields and show the proper units? this has to be simple but i cannot get it to work... :mad:

View 4 Replies View Related

Unmatched Query Not Working

Sep 21, 2005

I have a a table that changes monthly, and each month I need to find the records from the old table that are not in the new table and visa versa. I made the entire row in the table the key.
and wrote two find unmatched queries.
However, the queries are not finding all the information that is no longer there or that has been added.
Can someone please take a look and see what I am doing wrong?
Any help appriciated!!
Thanks


the tables are imported from Excel

View 2 Replies View Related

This Query For A Rowsource Not Working

Sep 29, 2005

Ive posted similar in the forms section but it has gone unanswered so I've pulled out the offending query and hope someone here can offer insight into this frustrating problem.

I have a form [Training Record] that has 2 combo boxes.

Box A (course_title_combo) has the titles of the various training courses. It pulls 2 columns from the training_courses table, namely courseID and course_title. Only course_title is shown in the box. The control source of this is set to CourseID as this is the field to be written to the training_record table, showing who attends what course.

Box B (course_date_combo) is MEANT to pull through the dates that each course is on, by pulling through the course dates for each course where courseID (as selected by combo box A) is equal to the courseID in the course_dates table.

Here is the current rowsource query for box B - which is basically showing blank fields...

SELECT tbl_course_dates.course_date, tbl_course_dates.CourseID FROM tbl_course_dates WHERE forms![training record test form]!course_title_combo=tbl_course_dates.CourseID

I cant see what is wrong with the query, but Im guessing it must be wrong as it is the rowsource which determines what is included in combo box B.

Any help would be appreciated no end - im totally stuck now :(

View 8 Replies View Related

If Statement In A Query Not Working?

Oct 9, 2005

hi im trying to do the following if statement in a query but its not working, anyone know what im doing wrong?
any help would be great.

-------------------------------------------------------------------------
New: IFF [(TABLE-SALES]![PERIOD]<=[TABLE-AVERAGE]![ACTUALS_TO_PD] then [TABLE-SALES]![ACTUALS_TO_PD]) else
[TABLE-UPDATE]![FORECAST_1_BASE_VALUE]

------------------------------------------------------------------------
im trying to say if the field "period" in the table: "TABLE SALES" is the same or less than the value in the field "actuals to pd" in the table :"TABLE-AVERAGE" then the value displayed in this field ("new") should be the value: "actuals to pd" in the table "table-sales" otherwise the value in the field "forecast1 base value" in the table "table update"

View 4 Replies View Related

IIF Statemenst In Query Not Working??

Nov 30, 2005

Hi, i have the below code in a field in a query

PD1ACTFORVAL: IIf([ACTUALS_TO_PD]>=1,[PD1ACTVAL],IIF([FORECAST_1_INC_BASE]=TRUE,[FORECAST_1_BASE_VALUE]+[FORECAST_1_PROMO_VALUE]),[FORECAST_1_PROMO_QTY])

but a message says:"the expression you entered has the wrong number of arguments" .....Any ideas what im doing wrong?

(if forecast_1_inc_base is false id like just the last part of code to be done...ie FORECAST_1_PROMO_QTY)

Any help would be great, cheers

View 10 Replies View Related

Update Query Not Working

Jan 12, 2006

Hello all,

I have the below update query running

UPDATE tbl_master SET tbl_master.COLLRAW =
Iif(tbl_master.PSTATE = "WV","WV",
Iif(tbl_master.PSTATE = "MA","MA",
Null))
WHERE tbl_master.EXCLUDEREASON Is Null

but when I add this line:

UPDATE tbl_master SET tbl_master.COLLRAW =
Iif(tbl_master.PSTATE = "WV","WV",
Iif(tbl_master.PSTATE = "MA","MA",
Iif(tbl_master,MSPBANK in ("751","752","753","854","855"),"GS",
Null)))
WHERE tbl_master.EXCLUDEREASON Is Null

It give me an error message that says "Wrong number of arguments in Query Expression." Can anyone tell me what is wrong with the query above?

Thanks in advance,

Vassago

View 2 Replies View Related

Query Criteria Not Working

Feb 3, 2006

I have a query with several criteria

SELECT tblProjectDetails.projectid, SubType.SubType, tblProjectDetails.status, tblProjectDetails.product, tblProjectDetails.description, tblProjectDetails.type, tblProjectDetails.producttype, tblProjectDetails.confidence, tblProjectDetails.flatamount, IIf(IsNull([reduction]),(([currentprice]-[newprice])*[volume])/(13-[cutinmonthnmbr]),(([reduction]*[volume])/(13-[cutinmonthnmbr]))) AS Calc, ([flatamount]/(13-[cutinmonthnmbr])) AS Calc2, IIf(1>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Jan, IIf(2>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Feb, IIf(3>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Mar, IIf(4>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS April, IIf(5>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS May, IIf(6>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS June, IIf(7>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS July, IIf(8>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Aug, IIf(9>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Sept, IIf(10>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Oct, IIf(11>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS Nov, IIf(12>=[cutinmonthnmbr],IIf(IsNull([flatamount]),[Calc],[Calc2])) AS [Dec], tblProjectDetails.cutinmonth, tblProjectDetails.DMO, tblProjectDetails.fcstloc, tblProjectDetails.projecttype, tblManagers.last, tblManagers.managerid, tblProjectDetails.currentsupplier
FROM tblManagers RIGHT JOIN (SubType RIGHT JOIN tblProjectDetails ON SubType.SubTypeID = tblProjectDetails.subtypeid) ON tblManagers.managerid = tblProjectDetails.managernew
WHERE (((tblProjectDetails.status)<>"Concept" And (tblProjectDetails.status)<>"Tabled") AND ((tblProjectDetails.producttype)<>"3") AND ((tblProjectDetails.confidence)="1") AND ((tblProjectDetails.cutinmonth)<>13) AND ((tblProjectDetails.DMO)<>Yes) AND ((tblProjectDetails.fcstloc) Is Null) AND ((tblProjectDetails.projecttype)<>"Other") AND ((tblProjectDetails.cutinyear)=2006) AND ((tblProjectDetails.currentsupplier)<>"Venture"));

Everything works great except for the very last criteria <> "Venture". I have one project that this query should leave out but it eliminates any project with a Null in the supplier field instead of just supplier "Venture". Why would it do that and what would be the solution?

Thanks

Toni

View 2 Replies View Related

Query Stopped Working

Mar 3, 2006

I made some minor changes in my data entry form, the table and the query form. I believe they are all consistent. But now my query comes up empty no matter which parameters I choose. How do I figure out what went wrong?

View 2 Replies View Related

Insert Into Query Not Working

May 10, 2006

I have designed a database to store training records. I created a form with a multi-column text box so I can select all employees who have attended a training session that day, and update all records at once. The form has a combo box, as well as two text boxes. Even though the listbox has three columns, I only need to pass the first column. The three columns (in order) are Employees.EmployeeNumber, Employees.FirstName and Employees.LastName. Selecting the command button should run an append query to enter the EmployeeNumber, SOPNumber, RevisionNumber and TrainingDate to the SOPTraining table.

FORM
frmAppendSOPTraining
lstEmployees (unbound)
cboSOPNumber (unbound) (the numbers are pulled from an SOP table)
txtRevisionNumber (unbound)
txtTrainingDate (unbound)
cmdAddRecords

TABLE Employees
EmployeeID (AutoNumber)
EmployeeNumber (Number Long)
FirstName (Text)
LastName (Text)

TABLE SOPTraining
TrainingID (AutoNumber)
EmployeeNumber (Number Long)
SOPNumber (Text)
RevisionNumber (Text)
TrainingDate (Date/Time)

I had some errors in the code at first, but with help from another site, I was able to fix those. The problem now is, that the SOPTraining table is not being appended. :(

Private Sub cmdAddRecords_Click()

Dim frm As Form, ctl As Control
Dim varItem As Variant
Dim strSQL As String
Dim strSQL2 As String
Set frm = Forms!frmAppendSOPTraining
Set ctl = frm!lstEmployees
strSQL = "INSERT INTO SOPTraining (EmployeeNumber, SOPNumber, RevisionNumber, TrainingDate) VALUES ("
strSQL = strSQL & "'" & Me.cboSOPNumber & "', '" & Me.txtRevisionNumber & "', #" & Me.txtTrainingDate & "#, "

For Each varItem In ctl.ItemsSelected
strSQL2 = strSQL & ctl.ItemData(varItem) & ")"
CurrentDb.Execute strSQL2
Next varItem
End Sub

View 4 Replies View Related

V. Simple Query, Not Working

Jun 25, 2006

Hi Lads

Hi guys, I want to return all the records which contain information under a particular column heading, hence the statement thats supposed to return all tables where Sector colum is not empty. I am new to SQL and Access so not sure why this simple query isn't working. It is a subform and displays the results in the "details" section of the form below the controls.

I think it could be something to do with the fact that its a subform, but Im not sure about this.

Me.RecordSource = "SELECT * FROM [tblRecordInfo] WHERE Sector <> "" "

any ideas guys? any assistance is greatly appreciated

thanks in advance

View 2 Replies View Related







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