Computer Support Forum

Displaying an Attachment Query in a Form

Question: Displaying an Attachment Query in a Form

I am a true beginner in access programming, so excuse if my methods isn't the best, and any advice would be much appreciated.

My main problem is displaying a Query I did on an attachment field in my main table on a form.
This is what i am working with:
Access 2007
My main table name : Table2
Attachment column name in Table2 : Target_photo
Query name: QuerySpecGraph (Query on the attachment field)

The query works perfectly fine when I run it and gives me the correct result. Now to display the query on the form I added an new attachment under controls and edited the control source to display the query results.

I used the function dlookup:


I tried similar code on a text box, with a text Query and that worked fine. However it does not want to work for the attachment.

Then I tried to analyze the situation to see if the query is the problem, so changed the attachments control source to:


this was to see if even a basic dlookup function works in the attachments control source, but yet again the attachments box stays empty (Again I tested the simple dlookup function with a text box to see if my table is the problem, but the textbox's dlookup works fine)

I do not know what I am doing wrong, or if it is even possible to do what im trying to do! Any advice would be much appreciated, and if there is away around this I will gladly explain in more detail what im trying to do.


Relevance 100%
Preferred Solution: Displaying an Attachment Query in a Form

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link (This link will automatically start a download of Reimage that you can save to your computer.)

Answer: Displaying an Attachment Query in a Form

12 more replies
Relevance 82.41%

I'm sure this is an easy fix but I can't seem to find it. I just have a form, that will be a subform of another, that needs to display the results of a query.
The query is simple enough, just displays all fields of records that fall between specified dates. The query works great, but when I attach it to the form as its record source it doesn't display the data. I can see the correct amount of record selectors so I know its understanding the query but its as if all fields are hidden!

I have also tried building a query to the forms record source that was simply Select query.* From query. Oddly I have had this working before but I had to specify every field. What I mean is:

Select title From query
Select type From query
Select date From query ...

And so on for all the fields but this seems foolish, can anyone think of what I may be doing wrong?
Thanks in advance!
Edit, forgot to mention I also tried the foolish solution that I mentioned above and it didn't work so its definitely some issue that I'm not seeing, some property that's probably not appropriately set

Answer:Solved: Access 2010 form not displaying query

8 more replies
Relevance 64.37%

I am a new user to Access 2010. My operation system is Window 7.
I have created a data base with two tables. The first table contains a list of students and their personal information. The second table contains student subjects and has many subject records with a relationship to the student record. The relationship key is the student id.

I have created a form that populates with the student information and contains a subform that populates with that students subjects. All of this works great for existing students. I can edit the student information and and new subject records.

Now here is my problem. I would like to create a form that preceeds my current form. The user would input a student number and click search button. If that student number exists on the student data base then the form that I created should open populated with the student data and their subjects and allow the user to update it. If the student number does not exist, then I would like that same form (or a form with the same layout) to open and the only data populated is the student number that was input on the search form. The user should be able to input all of the student data and course information and hit a save button that would insert the records into the correct database tables.

I have tried many methods to create the intitial search form that would open the correct version of the student form without any progress. Could someone provide me with the macro that would open that correct form, or set t... Read more

Answer:Access query to open Add form or Edit Form

needaccesshelp, welcome to the Forum.
First a couple of points, you do not need to "save" the record, access does so automatically. Also when creating a New record the subform should be automatically populated with the Student Number, this is controlled by the master child links.

The combo you need is a Find combo which can be created using the combo wizard, that combo can have it's Not In List Property set to yes, which can then be used to trigger adding the student that to the table and then to the form (and combo).

1 more replies
Relevance 64.37%

Hi all,,
This my first entry in this forum.
I have a form based on a query.
I am taking the parameter (say INVOICE-NO) from a message box and loading the form.
In the Select Query, I made the WHERE = to the Message Box value, INVOICE-NO.
It works as long as the Invoice exists. However, if it does not exist, then get errors "Type Mismatch" followed by "You Can't Assign a Value to this object" followed by Error 2950 and the gets out of the form.

Please Help as soon as you can.

Answer:How to Validate the query parameter before loading the form that is based on the query iteself?

Hi ISA welcome to PCR I am not able to answer you question but I am sure one of our team will be able to help. Once again welcome and do join in and enjoy.

3 more replies
Relevance 59.45%


Does anyone have a script in ASP VB Script that allows to attach a file to a webform and sends it (form fields data and the file attachment) as an email?

Answer:Web form with file attachment

hope this will help.

2 more replies
Relevance 58.63%

In sending an email to an [email protected] address we can insert an attachment, picture or text. Is it possible to put an attachment into a website contact form? There is no obvious provision for an attachment.

Answer:Put an attachment onto a website contact form

I'm sure you can do it. I am not entierly sure how to do it but use

2 more replies
Relevance 58.22%


I require a cgi script that attaches a file to the email with the rest of the form information..Instruction s along with this on how to set it up would helpful but maybe not necesarry. Can anyone help me out?


More replies
Relevance 57.81%

HiI have sent a few e-mails at work recently using Outlook. Ocassionally when attaching files the attachment is duplicated when i look in sent items. e.g i send an e-mail with attachment of word doc 1. When i check sent items the e-mail appears with word doc 1 + word doc 1 attached. I am definately only adding the files once. This happens with other files also.Does anyone know what is causing this??FF

Answer:Outlook attachment query

If you could give us a blow-by-blow account of your method, it might allow us to try and duplicate the action and find out what's going wrong.

3 more replies
Relevance 57.81%


Just read that there are two levels of attachment security. Apparently, there is level 1 which is blocked and cannot be changed. level 2 is when they prompt to save to disk. What I want to know is is it now more secure that when you get an .exe which is Level 1 it cannot be changed to .exe.js . If this is so, then it seems to be a more secure system to evade the Viruses.

The level 1 are:

ade Microsoft Access project extension
.adp Microsoft Access project
.bas Microsoft Visual Basic class module
.bat Batch file
.chm Compiled HTML Help file
.cmd Microsoft Windows NT Command Script
.com Microsoft MS-DOS program
.cpl Control Panel extension
.crt Security certificate
.exe Program
.hlp Help file
.hta HTML program
.inf Setup Information
.ins Internet Naming Service
.isp Internet Communication settings
.js JScript file
.jse Jscript Encoded Script file
.lnk Shortcut
.mda Microsoft Access add-in program
.mdb Microsoft Access program
.mde Microsoft Access MDE database
.mdz Microsoft Access wizard program
.msc Microsoft Common Console Document
.msi Microsoft Windows Installer package
.msp Windows Installer patch
.mst Visual Test source files
.pcd Photo CD image or Microsoft Visual Test compiled script
.pif Shortcut to MS-DOS program
.reg Registration entries
.scr Screen saver
.sct Windows Script Component
.shs Shell Scrap Object
.url Internet shortcut
.vb VBScript file
.vbe VBScript Encoded Script file
.vbs VBScript file
.wsc Windows Script Co... Read more

More replies
Relevance 57.4%


I am trying to create a data entry form for a large database. There is a parent form with 6 forms linked with a one-to-one relationship (due to a large number of fields) and several tables linked with a one-to-many. All have auto update/delete checked. The date entry form uses tab control (across 11 tabs) and subforms for some of the tables. I have two problems...

Firstly, if I enter part of the data for a new record in the form (eg fill in tabs 1-3) and then close it, the data appears in the tables, but when I re-open the form the record does not appear, so it is impossible to complete the data entry.

Secondly, when using the tab key to move through the fields in the table, when I get to the end of a tab control, instead of moving to the next tab control for the same record, it moves to a new record on the same tab.

I am fairly new to access and not familiar with all the code etc behind it, so I would be grateful for any advice!


Answer:Access form not displaying all data

9 more replies
Relevance 57.4%

I basically have a Main Menu form, on which I have a variety of tabs. On one of the tabs I want to have a series of combo boxes from which users can enter/select the value they require. In the After Update I need some sort of code as below, that will allow me to display the record/s matching the value provided/selected by the user.

-this command is expecting an =

So a user has a combo box called ID, they may enter or select a value from a drop down list, a form is then displayed from tblImprovements in frmImprovements. What am I missing? Any ideas?

Answer:Filtering in Access and displaying in a form

I think you have the order of the filter wrong. Also you should not need the .AfterUpdate piece of the combo box. Try

1 more replies
Relevance 57.4%

I filled out a form on my computer that I received as an attachment in my gmail account.  I want to email the completed form back to the email address of the person who emailed it to me.  I downloaded the form onto my pc.  I've tried to copy/paste the completed form into the reply box but have not been able to.  I also went under "File" and selected "Send To" and then "Mail Recipient", but when I click "Mail Recipient" I don't get any kind of message saying that the computer sent anything or not.  I use XP Home o/s and Firefox browser.  Thanks for any replies.

Answer:Can't figure out how to email a form I filled out I received as an attachment

when you are in your google account, compose a new message, and click on the small paper clip at the bottom of the page. this should allow you to add an attachment.

2 more replies
Relevance 56.99%

Hi all,

I am a beginner to MS Access. I was trying to create a form in Access which has 3 combo boxes on it, with each of them having the data on accountname, report type and date respectively. This data comes from 3 tables which are two column tables with one filed being the primary key one and the other fiield having the say accountname as type Text and so on. The form has the functionality that as a user chooses a particular combination of accountname, report type and date from the 3 combo boxes and clicks on a button titled 'Display report' the respective pdf file opens up. These pdf files are stored in a particular folder and are named as a concatenation of 'accountname+reporttype+date'. The form also needs to have a button clicking on which the user can close the form.
Any directions members !

Also could anyone explain me what actually a query is and what relationship does it have with a form. I have some idea about this but i am still not fully clear about these concepts.


Answer:Creating a form in MS Access for displaying reports

i posted a similar question about 2-3 weeks ago... I hope someone has the answer...

2 more replies
Relevance 56.99%

Hi Guys
First timer - so please tread gently! I'm sure this is a similar situation, but wasn't sure whether it warranted another separate conversation.
I have a situation on an unbound list box in Access 2000 and haven't yet got to the bottom of it. I have a box which displays incorrect records for the user to correct. When they first go into the box, they see all 500 records (for example) and use a dble click event to edit the one they want, when they return to the box it will only display the first visible amount of records. They can use the scroll bar but the records do not scroll!

The Code behind ( and here's where I get lost - I don't do VB!) opens another form, allows you to edit the record, saves the changes, closes the form and returns you to the original form. We have tried keeping the original form open, as it was closed and reopened, but no change.

The DB has been inherited, so I have no idea why a List box has been used an not a combo.
Forms data is taken from a query.

I'll work out how to post a copy of the empty DB to you!

Answer:Access 2000 - Not displaying all records on Form

6 more replies
Relevance 56.99%

Hello OBP and others,

I have 3 Access XP survey forms that are not displaying the uploaded data in the tables, though they are restricting the number of records to the number of surveys in entered into the tables (as they should be doing). The "Data Entry" settings are set to NO for all forms and subforms. Do you have any suggestions as to how this can be fixed?

Thank you,

Answer:Access XP Form Not displaying Table data

16 more replies
Relevance 56.99%

Hi all.

I am using WebEasy Professional 6 to design my website. I have inserted a form on my 'contact us' where clients can submit comments, however these comments display in html format when I view it in my inbox (Microsoft Outlook). Does anyone have any suggestions to correct this? Thanks!

Answer:Form on website displaying comments in html

Greetings, BexBomb.

Sounds like you've got something missing, most likely a bracket. Look for code similar to this:

<form>yada yada</form

Notice the missing > after the second "form".

If you can't find the culprit, post the address and I'll take a look at it, or you can validate the page at which should show any HTML mistakes on the page.

3 more replies
Relevance 56.58%

Hello everybody!

I have searched through all the tech articles I can find on Access 2000, merging, Word and Outlook, and I can search no further.

Can someone please help me to create a command button on a form in Access 2k that will megre a query to a Word document and send it as an attachment to email recipients (whose addresses are stored in the query)?

As a start, I have created a button that merges the query to a new Word document using a merge templete. Also, I have found code to send email to a list specifying a message text, subject etc. I just can't seem to bring it all together.

I know someone, somewhere has asked/answered this question before, so I apologies for the repetition.

Any suggestions please? Your help will be greatly appreciated.


Answer:merge access query to outlook as attachment

12 more replies
Relevance 56.17%

Computer:Del Vostro 430 runing Windows XP Pro Service Pack 3, Comodo Firewall, AVG Free.Following a malware infection (now cured, see,134485.0/all.html) I have a strange problem with Windows Files Search.  These two images show the Windows Files Search launched from Start > Search > For Files and Folders, and from Windows Explorer > SearchAs shown, the search form at the left is not displaying properly.  Somehow it is scrunched up vertically so that only a tiny part of the actual form can be seen.  The scroll bar of the form still works and I can get to all parts of the form but to use it is like doing keyhole surgery.  Also, the link for the alternative Search Assistant (the ?cute? puppy) is missing.What in the world could be causing this behaviour?  Any ideas are welcome.Keith

Answer:Windows Files Search form not displaying properly

Do you have your XP CD ? ?If so...from a command prompt type in sfc /scannow and hit Enter...let it finish and re-boot...The cute Puppy may even come back...

2 more replies
Relevance 56.17%


I wonder if you can help me with something. I have created a Form where there are 4 drop down boxes that collect data from 3 tables. How can I use that form to search for all the records matching one or more criteria chosen from those drop down boxes and display other fields on a report or a table?

The case is:

Table_Candidates (number of candidate, name, date of birth, address,…)
Table_Professional_Habilities (professional experience, years on the job…)
Table_College_Observations (College attended, degree, years, field of expertise…)

Form – Drop Down Boxes

Professional experience
College attended
Result Expected (How do I get this? In a table or a report, it doesn’t make a difference)

Number of candidate
Professional Experience
College Attended
Field of expertise
Age (how can I calculate this from date of birth?)

I've been advised to use Expression Builder. But the query isn't working because itreturns blank. Should I only select the fields on the Expression Builder (as an example, this is what it appears " [Forms]![New_Frm_Parameters_Selection]![Combobox17] "? Or should I make another expression?

Thank you very much.

More replies
Relevance 56.17%

Hi folks, I have a multipage form as part of an Excel development that requires checking the completion of fields on page 1 when a user enters page 2. All very straightforward I thought having done it many times before in word macros

eg If Multipage1(0).<variablename> = "" then
msgbox(<error message>)
multipage1.value = 0
End if

but no. The tab of page one is activated but the form controls displayed remain stubbornly those of page 2 and vb sicks up because it can't see <variablename>. The only reference I've found to this is that it was driving people mad and 'appeared to be a bug in XL2003'(sic) I'm using Office 2010.

Has anyone else had this problem, and more importantly found a cause/solution?


More replies
Relevance 55.76%
Question: Form query help

Hi there,

I am also new in the forum and i really need your help!

I am using a main form with a subform, a text box, and a run button (see picture below). I want the user to enter a number that will be used by the query and will populate the subform with the search results. I am getting the correct search results only if I click the refresh button. It seems like the Run button is not linked to the query/subform and I don?t know what properties the text box/Run button/subfrom should have.
Thank you very much!


More replies
Relevance 55.76%
Question: Query By Form


Thanks in advance for all the help given.

I am using Access 2007. I want to create a form that will do a search for baseball trivia info.


What 2 or 3 (number could be higher) players played for both the Cards, and the Giants, and were starters on the allstar team.

I have all of the data necessary for these queries. My problem is that I am not proficient enough with Access or VBA to create a multi-choice form - with an underlying query.

I think the one example above should give everybody an idea of what I want to do. Please send me email at my [email protected].

If there are more questions about what I am doing, please don't hesitate to ask.



Answer:Query By Form

12 more replies
Relevance 55.76%
Question: Query from Form

Please is it possible to assign the Query Criteria from a form. The user need to enter the date range in a form and then by clicking the Run button, the query will run with the Date range criteria. Please if you may have a solution let me know.

Answer:Query from Form

Is this the same as your question on Combo1?

2 more replies
Relevance 55.76%


I'm having a problem with a search sql query in asp using criteria selected(from drop down menus)in a form. I keep getting an error saying message saying too few parameter or their is an error with the datbase(its working fine) When i do the query with just one of the criteria it works fine but when i try to do it with all six, it never works!
Can anyone help?

this is a bit of my code :

dim ar, prop, beds (6 variables altogether)

ar = Request.Form("Area")
prop = Request.Form("PropertyType")
beds = Request.Form("Bedrooms)

query = "SELECT * FROM Properties" _
& "WHERE Area = ("'&ar&'")" _
& "PropertyType = ("'&prop&'")" _
& "Bedrooms = ("'&beds&'")"

Set RS=dbConn.Execute(query)

Answer:sql query using form in ASP

Between each criteria you need to put the word "AND" with a space before it so it doesn't get concatenated with the last criteria. There should also be a space before the word 'Where' or it will be connected to the word 'Properties' on the line before. One more point, if you want the SQL statement to come out with the contents of the variables enclosed in quotes then the single quotes should be inside the double quotes. The SQL statement should look like this:

query = "SELECT * FROM Properties" _
& " WHERE Area = ('" & ar & "')" _
& " AND PropertyType = ('" & prop & ")" _
& " AND Bedrooms = ('" & beds & "')"

That should do it. Let us know how it works. Good Luck!

1 more replies
Relevance 55.76%

I am trying to implement a Query by Form in Access 2000. What I have done so far is that in Query's Criteria section I inputted the Following Code:
Combo1 is placed on a form, which user may input his/her selection and upon pressing Command Button on the form, a Macro is called which runs the query and result are produced no problem.
But the problem is that I need to run the Query in a module and what I have done then is upon pressing the Command Button on the form a function in the Module is called and the following code are executed

Dim db As DAO.Database
Dim rs As DAO.Recordset
Set db = CurrentDb
My_Query="Select * from Query_1"
Set PtrQuery_1 = db.OpenRecordset(MyQuery_1)

and upon reaching Set PtrQuery_1 = db.OpenRecordset(MyQuery_1) I get
an error saying "Runtime Error '3061' Too few parameters.Expected 1" .
I should remain you if I input the Criteria directly in Query design view (criteria section) by just typing i.e. the style number and run the query from module alone I get the result fine but when I am trying to get the criteria from the form and run the module I get the error? Please any hint that give head start to overcome the problem would greatly appreciated.

Answer:Please need help with query from form

6 more replies
Relevance 55.35%

I have a microsoft access database that tracks projects for my department. I currently have a query that I use to generate a report that shown me how recently the project has been updated:

SELECT Tasks.Project, Tasks.Description, Tasks.Date
FROM (SELECT Project, MAX(Date) AS maxdate FROM Tasks GROUP BY Project) AS x
INNER JOIN Tasks ON (x.Project=Tasks.Project) AND (x.maxdate=Tasks.Date);

I would also like this query to sort the status of the project, so that I am not reminding people with completed projects to update their information. However, the Project status is stored in a table with all other details called "Projects", and all tasks are input through the "Tasks" table referenced above.
I am having a difficult time having the query reference two unrelated tables, and I am trying to avoid replicating data. the basic idea is " where Tasks.Project = Projects.[Project Name], display Status", but I am having trouble finding out how to do this in SQL or otherwise.
Any help would be greatly appreciated.

Answer:Solved: Query Displaying From Multiple Tables

9 more replies
Relevance 55.35%

I was wondering if there was a way to display every single day of a date parameter query even if no records exist for particular dates within that range.
Say that I have records with date ranges within a week 9/1/2004 through 9/7/2004, but actual records/dates only being from 9/1/2004 through 9/5/2004. Is there any way that I can display dates from 9/6/2004 and 9/7/2004 without having actual records for those dates in a query/report?

Answer:Displaying Null Dates On A Query/Report


2 more replies
Relevance 55.35%

Ok i'm trying to make a small test script that will query my database and display the result.

$db = mysql_connect("localhost", "****", "");
$test = mysql_query("SELECT name FROM employees WHERE punch = 34");
printf("Name is %s, $test);

now when i try to run this, i get
Parse error: parse error, unexpected $ in /home/fritzsof/public_html/php/recall.php on line 11
only line 11 is at the end of my script and there is nothing there
no if i ocmment out the printf statemtn this goes away so i know my erro is there
What am i doing worng and/or how can i display databse query results?

Answer:Displaying a MySQL Query result usin PHP

you forgot a "

and PHP si not C, it's not:
printf("Name is %s, $test);

echo "Name is $test";

6 more replies
Relevance 55.35%

I have an issue that I was hoping that I could get a bit of help on. I have a form that users can use to enter peramaters to send to a query. In the query i have set up the parameters as such [Forms]![myform]![mycontrol] or is null. I can get everything to work (Names, ages, dates etc...) but I am having huge problems using a combo box to add operators to the age and date portion of the query to query for like all records where an age is <20 or >20 etc... I know it can be done, I am just at a loss as to exactly how it is done. If I go into the query and actually put in <20 in the age field all records <20 show on the query, but I can not get it to work pulling the age and the operator from the form. Any help would be greatly appreciated as I am at my wits end.

Answer:Query by Form (Access)

6 more replies
Relevance 55.35%

I'm venturing into an area i have never really done anything with in Access before. I created a query which has all the fields in it. Then i put a couple parameters in like [What is the date?] in a date field and [What is the company name?] in a company field. So now i want to create a form, which uses both those inputs and displays the results.

Do i need to put the [questions] in the query or do i create 2 controls on the form itself and use some kind of code to make it apply what is typed in as a filter to the query? Even if someone can point me to a website that shows how to do it i would be happy with that as well. I'm having a hard time googling what i want to do and getting good step by step instructions.

I want to be able to put up to 3-4 text boxes on the form, if all or only 1 of them have data in them, then when they click the button show the filtered results. Does this make sense? Any help is appreciated. Thank you.

Answer:Form to run a filtered query

16 more replies
Relevance 55.35%

Hi there, i wounder if you can help. I am ok with Access, but VB code is where i fall down a little. I am trying to create a search form (frmStudentSearch) that is made up of text boxes, a combo box and check boxes. These boxes will form the criteria for my search. I wish to enter in the relevant data uaing such controls and then select a search command that then opens up a results form (frmSearchResults) showing the names of the students who meet that criteria.

Some of the controls though may sometimes be left empty so will be null. i have tried to just link the controls to a query however i am having no such luck. So what i planned to do was to create the code that creates a query based on that certain criteria everytime the code is run (using a command button), each time replacing the previous query. However when i use this method the code i use only works for those fields where numerical data is entered. Any Suggestions will be greatly appreciated. I have attached the database if it makes things easier.Thanks

Option Compare Database
Private Sub cmdSearchStudent_Click()
Dim rs As Object, strsql As String, qdfNew As Object, var As Variant, tempquery As String
Dim sSELECT As String, sFROM As String, swhere As String, itemcount As Integer, dbs As Object
On Error GoTo errorcatch
swhere = " WHERE not isnull([Student ID])"
If Not IsNull(Me.txtNameEngSearch) Then
swhere = swhere & " AND [Student Name (English)] = " & Me.txtNameEngSearch
End If
If Not... Read more

Answer:Solved: Query By Form

9 more replies
Relevance 55.35%

I have a field on a form that is auto-filled based off of another field. The text is correct. When I try to use that field (which is auto filled) the query does not select based off the data in that field. But, if I manually put the text that is shown to be in the field, in my query parameter, it works. I cannot figure this one out!

More replies
Relevance 54.53%

Hi, I'm using Access 2003. I'd like to create a form to select search criteria, then use the resulting data for a mailing list. Would this require VBA code? Thank you for your help.

Answer:Create a Query from Form Entries

12 more replies
Relevance 54.53%


I have no idea what i've done but basically i had lots of querys and i converted them to forms using "create" then "form" option. This adds the fields from the query and the code im using works. However if i delete this information and add the same fields in manually my code no longer works.

May seem silly that i've done this but i've done it for the purposes of changing information or fields down the track. I didn't want it to be a hassel and the "create , form" option didn't seem to be very versitile.

An example of the code i'm using is below. when the tick box is ticked it a price is found and placed into a field. This was working until i deleted the information generated by the 'create form' option.

Private Sub RuralLift_AfterUpdate()
' when you tick rurallift it will charge the amount, when you untick it the amount is zero
If [RuralLift] = True Then [RURAL DESTINATION LIFT 20/40] = DLookup("[RATE]", "PricingT", "[Description]='RURAL DESTINATION LIFT 20/40'") Else [RURAL DESTINATION LIFT 20/40] = 0
End Sub
Any ideas at what i should like for to fix this?

Answer:query to form then view in datasheet

**** sorry so i had another look and i honestly don't know how i figured this out.. just a good guess really.. changed the code from;
Private Sub RuralLift_AfterUpdate()
Public Sub RuralLift_AfterUpdate()

1 more replies
Relevance 54.53%

I created a database and I want to make a search form by which I can filter some data. I made a query for that and addressed form fields in criteria part. but the problem is when the form field is empty, the query shows me none of the records but I want it to show all the records when the form field is empty.

Answer:problem filtering the query by using a form

10 more replies
Relevance 54.53%

Hi there, i wounder if you can help. I am ok with Access, but VB code is where i fall down a little. I am trying to create a search form (frmStudentSearch) that is made up of text boxes, a combo box and check boxes. These boxes will form the criteria for my search. I wish to enter in the relevant data uaing such controls and then select a search command that then opens up a results form (frmCriteriaResults) showing the names of the students who meet that criteria.

A lot of it i have managed to complete, and i have done so by applying code that creates a query everytime, and then with this query it opens the results in the form.

My issue is that there are a few fields that come up with an error but where the same code is used some dont. i think it might be because those that arent working are text fields and the others are numeric fields.

The next issue is with one of the fields i want to search by. i have a text box called age. I want the user to be able to enter an age, and then using the same process as above, sorts the students stored that are of that age.

I have attached the database as it might help to understand what i mean. The issues are highlighted in RED. Any suggestions would be greatly appreciated. Thanks

More replies
Relevance 54.53%

I am creating a database with MS Access. I want a select query to choose certain records from a table and display them, depending on which if six values features in a specific field.I want to do this using a form, so that I can have all six values on the form as check boxes, display the form and allow the user to tick which ones to include in the query, and then run the query to select values that match those ticked. Can anyone advise me how to do this?Thanks,Gary

Answer:MS Access Query using parameters from a form

If your six values will never change you could create a form with six labels to display your values and six check boxes to tick. If you want the records to display on this form add a subform which is looking at your table. Use the IIF statement to select your records ie IIF([Forms]![YourFormName]![Check1]= -1,"Value1","") Or IIF([Forms]![YourFormName]![Check2]= -1,"Value2",""Add 4 more Or IIF statements. Value1 and Value2 are to match your data.Hope this gets you started.

5 more replies
Relevance 54.53%

I've created a query which pulls information from a form and runs a query based on this information. The problem I'm having is that although the data is changing in the form and hence the table which holds this information, the query and associated report are still using the old data.

I've not come across anything like this before and wander is this a known issue with MS Access? Has anyone else come across this and if so how did/do you deal with it?

If anyone can help resolve this, that would be really appreciated.

More replies
Relevance 54.53%

I am having a problem getting this to work for me. I am fairly new to Access and I will try to explain the concern that I am having.

I have several tables that are linked by a ID. I developed a query that would create a larger table that would like the data from each table by the ID. (There may be serveral occuances on this ID)

There are several accurances of the the same ID. I would like to be able to use a combo box to filter the ID to the query and have it up date the information in the subform. In the subform I would like to do the same thing to filter the data down again by another criteria(event type) the table has only two types. When it is selected it filters the same queried data again and makes the selection slimmer again.
I hope I explained this well enough for someone to understand.


Test ID Run# Location data
TC4 1 home good
tc4 2 work bad
TC4 3 incar good
TC1 1 Home bad

So I want to filter on test ID(TC4) on the form, then filter on run(1) number and get this data
TC4 1 Home good

Answer:MS Access Using Form to Filter Query

lansdown812, welcome to the Forum.
From your description it doesn't sound as if your data is correctly structured, especially the part about multiple IDs.
Are you trying to remove the duplicates or carry on working with them?

Which version of Access are you using?

3 more replies
Relevance 54.53%

I'm new to this forum, I have some formal education with access but i do not use it a great deal. I have built a database that keeps records of work done on a particular street. Each street can have many records with types of work, exact locations and dates. I want to query for all work done on a particular street. My criteria cell on the query was filled using the expression builder, [Forms]![Flushing Records]![Streetname]. I run the query from a macros button. When I run the query I get my expression coming up as the parameter instead of the form i want to use to select the street. From what I have read on the forum so far is that the form has to be opened first. Is that correct? It seems backwards. If this is true then the same macro button that opens the query can also open the form?

thanks in advance

Answer:access 2003 query by form

Northernont, welcome to the Forum.
You are corrrect, the form should be open with a "street" selected, then the query (or form/Report based on the query) opened.
If you use a Main Menu or switchboard to open your form you can add a Command button to the Form to open the query.
Or as you say you can open the form with the Macro, I do not normally use Macros other than an Autoexec macro to open the very first Form in the database.

2 more replies
Relevance 54.53%

Please help. I'm running Access 2007. I have a Form that's running off a query. The query has a parameter that requests two user inputs. This works fine except when I open my Form it automatically asks for those two inputs. It still works but I'd like to be able to open the form, enter data and when I get to those fields have the parameter questions populate at that time. Any help is greatly appreciated

Answer:Query Parameter Field in a Form

7 more replies
Relevance 54.53%

i have a form based on a query so that entering an ID number in a field on the form will bring up other details of that record,

however, when i type a ID number not associated with any record the form still accepts the value but changes it to the next highest number not currently being used as an ID number and obviously no details are shown in the fields(because the record hasnt been saved)

how can i make sure that this doesnt happen and that when an ID number is entered it should only be accepted if it has related records

Answer:query based form confusing me

8 more replies
Relevance 54.53%

My database has two tables CR Detail Log that holds events and CR Policy Cert Info that holds customer demographics. I have built a search & edit function with a prompt to enter the customer number and it populates a replica of the data entry form. There is a control button that has a pop up form that I cannot get to populate. The main and subforms to populate. The form is listed as Search SubForm Accommodation Pop Up All. The table that contains this data is in the CR Detail Log. The queries I am using for this form is CR Detail Log Table to pull the data from the table and qryAccommodation Search which is attached to a Macro named Accommodation Form Search Macro.

I have attached the database. Can anyone suggest a way to get the data to populate?

Thanks in advance for any help you can provide!

More replies
Relevance 54.53%

Hi to all,

I'm using a Access 2003 form to access a query that'll be used to generate a report. The example I'm following is found in

On my form, I have a combo box (Course ID), textbox (StartDate) and textbox (EndDate).

In my query, I'm using the values from the above 3 controls as criteria.
E.g.: In the Course_Date field in my query, I used Between [Forms]![Form_Name]![StartDate] And [Forms]![Form_Name]![EndDate] as the criteria.

If I leave the form controls blank,and click on the OK button, it'll generate a report with errors. What should I do if I want to generate a report that display all records in the report? E.g.: If I select a course in my combo box and leaves the start date & end date blank, it'll generate a report that displays all records for that particular course.


Answer:Query criteria problems using form

11 more replies
Relevance 54.53%


I have linked my calendar 11.0 to my text boxes, and then to my query criteria. Everything works, except after I click on the Calendar to choose my end date and it shows up on the text box thats linked to the query, the information from the query doesn't automatically show up on my Form in other text box I have linked for results (d*count funtion, etc).

BUT, when I go into design view, and then back to form view, the Data is Updated!

So I am very confused as to how to set it up after I input the end date to automatically update instead of hitting the design view and back to form view for it to update.

Not sure if a "refresh" or "after update" function needs to be in place? I hope I explained it correctly! Thank you!

More replies
Relevance 54.12%

My church asked me to create a db. I'm a newbie but I figured I give it a shot. Since then, I've been pulling my hair out.

I'm using Access 2000 on M$XP. The Church Stewardship Secretary (CSS) is responsible for logging in each person's activities choices, and there are many activities to choose from. One may choose to be in the Adult Choir, be an Eucharist Mininister at 8 and 11:15, and volunteer to do electrical work.

I am trying to create a FORM with multiple yes/no choices and comment boxes so that the CSS can input each person's record. This "Masterform" will view current records and will update as new records are entered.

Step 1: Instead of using one ENORMOUS table, I subdivided the data onto 11 or 12 catergories. (BIG MISTAKE!!!)

1-Members (lastName, firstName, Phone)=TEXT (ChurchID=TEXT= PRIMARY KEY)

I linked the choices using a Church ID primary key----> I decided to use the first 3 letters of the first and last name for a primary key: Michael Jordan= micjor

The rest of the tables went as followed:
4-Music Ministry...

And so on ... Tables beginning from 2 had each record beginning with the ChurchID and yes/no columns. Usually each table had a comments text column as well. NOTE: Only those whom had selected a choice on the table would have their ChurchID and record appear on the table.

STEP 2: I created a one-to-one relationship from the Members Table to the other tables. I wanted each member to ... Read more

Answer:Cant create form or query from joined fields

7 more replies
Relevance 54.12%


I am using the Call Tracker template in Access 2007, and have got rid of the Call's List table and am just left with the Calls Table and the Call Details Form. I have created a query which finds information based on a set of numbers from two separate databases which I imported into my database. However, I want to be able to link that query to a form. In this form I have text boxes, each are labelled and linked to the table. So what I want the query to do is; when the number is entered into a text box, and the Enter Key is pressed, the query runs and finds the information and inputs it into the required fields below it.

If that doesn't make sense please let me know, any help will be appreciated.



Answer:Access 2007 Linking a query to a form

It does not make sense without a bit more information.
Are you trying to "Find" a particular record?
As your form should already display the data.

3 more replies
Relevance 54.12%

I know practicaly nothing about Access (2007), but have a general understanding of databases and queries (some experience with MySQL). I am trying to create a Query By Form (QBF) so that users can select some criteria from a clean-looking page and have Access return the results of their selections. To get me going, I was walking through this help document I found on Microsoft's site

For some reason, and maybe this is something I have to edit the preferences to fix, but when I edit the QBF_Query and save it, when I go back into it, it is always modified, so I can never get the right results from the query.

From my interpretation of the help tutorial, my screen ended up looking like this: (attached: query_before.jpg)

But when I save the query and then open it up again, my criteria has been corrupted and some of it placed in other cells like this: (attached: query_after.jpg)

Any ideas what is going on? Thanks!

Answer:Access Beginner: Trying to create a Query By Form

16 more replies
Relevance 54.12%


I am trying to develop a software for my Despatch Dept. But on the Form Order, I was trying to display the tblOrder.QuantityR, after adding the Quantity for a particular OrderID for tblOrderDetails.

I also need help on Error Handling.

And other errors in my Software.


Answer:Access: SQL Query, Form, and Error Handling Help

12 more replies
Relevance 54.12%

I'm in the process of creating a db and appear to have thought I knew more than I really do. The db currently has one table:


I need a second table (yet to be correctly designed!) which will contain equipment info:

Table2.????? - this should match Table1.DptKey

How I foresaw this working for me was to have a form where the enduser could enter in the equipment information, the employee info is already entered. I tried getting fancy and creating a query to allow for a drop down box that only showed all employees in Table1 that were NOT already in Table2. Within this form the I want(ed) to show the employee name and location, which are informational and not part of Table2, as this will be more intuitive to the end user than the Table1/Table2.DptKey.

I've tried to get this working a few different ways and can't seem to get it to function correctly. I don't know if it's because want I want to do can't be done or if it can and I'm doing some piece of it incorrectly? And I've now tried so many different things I don't know what I'm doing anymore.

My SQL is stronger than my VBA and I've been trying to solve this via queries/forms/web resources/chicken bones etc.

Can anyone tell me if what I want to do is doable or not? if so, how? I know that I want to ... Read more

Answer:MS Access03 design/form/query question

I didn't read your entire post yet (welcome to the site ), but I wanted to mention that the foreign key in your second table should have the same name as the primary key in the first table. In other words,

Should be

You'd then join the two tables in a 1-to-many relationship on that field by opening the Relationships window for the database, displaying both tables, dragging the foreign key from the second table onto the primary key of the first, and clicking Enforce Referential Integrity in the Edit Relationships window.

I'm going to say, never put spaces in any object names (not that you have). You should adopt a naming convention. Here's a pretty common convention.

Also check out The Ten Commandments of Access.

Some good resources:

The Access Web
AccessVBA (in particular, check out the FAQ forum)​
I feel like I ran right over that. If you have more questions, post back please.



2 more replies
Relevance 54.12%

Hi there i wonder if you can help. I am trying to create a query by form which i have mostly working, apart from one control on the criteria form. In the database i have stored a candidates date of Birth, and on this form instead of using date or birth as a critieria i wanted to use a range in the form of a combo box, so the user can select one of the following.


I have created the QBF so that it creates a new query everytime. The code for this is displayed below. Any ideas how i can implement this range into the code. Any guidance or advice would be greatly appreciated. Thanks

Option Compare Database
Private Sub cmdSearchStudent_Click()
Dim rs As Object, strsql As String, qdfNew As Object, var As Variant, tempquery As String
Dim sSELECT As String, sFROM As String, swhere As String, itemcount As Integer, dbs As Object
On Error GoTo errorcatch
swhere = " WHERE not isnull([Student ID])"
If Not IsNull(Me.txtStudentID) Then
swhere = swhere & " AND [Student ID] = " & Me.txtStudentID
End If
If Not IsNull(Me.txtNameEngSearch) Then
swhere = swhere & " AND [Student Name (English)] LIKE ""*" & Me![txtNameEngSearch] & "*"""
End If

If Not IsNull(Me.txtNameArabicSearch) Then
swhere = swhere & " AND [Student Name (Arabic)] LIKE ""*" & Me![txtNameArabicSearch] & "*"""
End If

If Not IsNull(Me.txtDOBSearch) Then
swhere = swhe... Read more

More replies
Relevance 54.12%

Hi there i wonder if you can help. I am trying to create a query by form where i have used a form that has various controls on. I wanted to use these controls as the criteria for my search. Once the Search command button is selected that this would open up the results that would show the relevant details. I had initially just linked the controls on the form to the criteria section of a query. However some of the controls could sometimes be Null. i know this is not such a problem, as you can just use the following formula.

[Forms]![frmStudentSearch]![cboCourseSearch] or
[Forms]![frmStudentSearch]![cboCourseSearch] is null

However i have 9 controls ranging from text boxes, combo boxes and two check boxes, and it seems to always crash and cause problems. Just to let you know that the query is based upon the data in three linking tables

I know it may be easier to use VB Code, however unfortunately this is an area that i fall down on. Any Advice or guidance will be greatly appreciated. Thanks for your time.


More replies
Relevance 54.12%

Hi All,
I have a field - Main food source, with the following drop down options:
beg for food
buy food on credit
buy food with cash
gift, etc.
I have entered the various option into a form.
I want to run a query to count the totals for each of these options.
I tried this: Beg for food:=count(Iif([fi_rsource]="beg for food",1)). it did not work. i got this error message- Data type mismatch in criteria expression.
Please can anyone come up with any assistance?


More replies
Relevance 54.12%

I have a problem and have working on it for 2 days. I have one table (persons) and one form (People). The form (People) has the information about the person like first name, last name, gender, marital status, etc. I would like to add “father” and “mother” if it is listed. The table (persons) have:
personsID first name last name gender marital status kids index kids …
1 John Smith male married 1 -1
2 Tom Jones male married 2 -1
3 Mary Smith female married 1 -1
4 Jane Jones female married 2 -1
5 George Smith male single 0 1
6 Pam Smith female single 0 1
7 Al Jones male single 0 2

The problem that the form (People) display the “person” but not the parents. I have a query that is:
Field: first name last name kids index gender
Table: persons persons persons persons
Show: X X
Criteria: [Forms]![People]![kids] “male”

which is supposed to display the father. Say, you’re displaying the record of “Pam” “Smith” “female” “single”. Running the “father” query you’re supposed to get “John” “Smith” but I get a blank listbox. Could somebody help me out with get the parents to display on this Form?



Answer:Solved: Access 2003 Form and Query

16 more replies
Relevance 54.12%

Hi there, i am relatively new to access and so a little naive with it all. I have created a database that purely stores details of what is in a candidates Cv. These details are things such as gender, nationality, and then others such as qualifications, spoken languages etc. Some of those are multi value combo boxes where the details have been entered in, there not looked up or anything.
Now the situation is that i am purely wanting to use the database to search the database, and want to do this using a form whioch contains a range of text boxes and combo boxes so that whenever i select the relevant data, it runs the query and produces the details that match that. Obviously if one of the combo boxes is left blank then i want it to disregard this field criteria. I have been told that the only way i would be able to do this is through VB code, which to be honest im not the best at. Ive tried small just to get it working first of all but im having issues. my code is dsplayed below:

Private Sub cmdSearchCriteria_Click()
Dim strWhere As String
strWhere = vbNullString
'Search for Gender
If Not IsNull(gendersearch) Then
If strWhere = vbNullString Then
strWhere = "(tblCandidateDetails.Gender] = " & gendersearch & ")"
strWhere = strWhere & " And ([tblCandidateDetails.Gender] = " & gendersearch & ")"
End If
End If
If strWhere = vbNullString Then
DoCmd.OpenTable "tblCandidateDetails"

'Finally,... Read more

Answer:Solved: Access 2007 Query By Form

16 more replies
Relevance 54.12%

Hi there, i am trying to create a query by form, and i am having some luck, but my issue relates to using list boxes and check boxes on my form. The situation is that i have a criteria form that has conmbo boxes, check boxes and list boxes. Once selected and the 'Search button' selected the filtered results depending on the criteria are displayed in another form. I have managed to successfully do this with the combo boxes however not with the check boxes or list boxes. The list boxes are set so that multiple items can be selected. Is there anyone that can lend a hand with this, i would greatly appreciate it. I have added the code i have used so far for the combo boxes. i understand that i do need to alter the code for list boxes and check boxes, however not sure how.Thanks for your time and efforts in advance.

Option Compare Database
Option Explicit

Private Sub cmdSearchCriteria_Click()
Dim strWhere As String
Dim lngLen As Long
'Gender Search
If Not IsNull(Me.cboGenderSearch) Then
strWhere = strWhere & " ([tblCandidatesDetails!Gender] = """ & Me.cboGenderSearch & """) AND "
End If

'Nationality Search
If Not IsNull(Me.cboNationalitySearch) Then
strWhere = strWhere & " ([tblCandidatesDetails!Nationality] = """ & Me.cboNationalitySearch & """) AND "
End If

'Academic Level Search
If Not IsNull(Me.cboAcademicLevelSearch) Then
strWhere = strWhere &a... Read more

Answer:Solved: Query by form using list box issue

16 more replies
Relevance 54.12%

VERY basic - sorry - still learning!

I have created a basic type of form on an excel sheet that I would like folk to type data into, then return to me.

To focus upon the form area - it's only 6 columns wide and 37 rows deep - I selected Page Break View which greyed out the non active cells.
Great- except a massive big PAGE 1 appears across my nice looking form!

How do I either
- stop that PAGE 1 text appearing
- use some other way of focussing in on my form?

thanks mucho Frankie

Answer:excel display and form query - very basic!

6 more replies
Relevance 53.3%

Hi all,

Ive tried a few things to solve this but cant get. Hope I can get some help here please! Here goes:

I have a query by form that allows me to search for a date range, a physician, an injury code, and three possible procedures. I have set up each procedure control (procedure_1 through _3) to retrieve data from their repspective fields in the injury table. Heres where the problem lies. I want to set up a control that looks up ALL three fields at once and gives me the result whether the procedure is listed under procedure_1, _2, or _3 field in my table. As it stands now, I have to do three separate queries with the same procedure in the different controls than combine those results to make one table and that is much too much work.

I would like to get rid of having 3 controls (one for each proc_1, _2, _3) and just have ONE control named PROCEDURE... and it will look at all of them and give results that have that procedure in any one of those procedure1,2,3 fields.

Hope this makes sense here. I am not a VBA expert and really dont have time to learn.. So I have been trying to accomplish this using the CRITERIA box in the query design. I am using the criteria:

Like [Forms]![FormName]![ControlName] & "*" Or [Forms]![FormName]![ControlName] Is Null

My control names are proc1, proc2, proc3 and I have tried combining three of these statements in every possible combination in order to achieve my results but have been unsuccessful.

Is there an easy way to do ... Read more

Answer:Access 2003: query by form - One control for up to three fields

9 more replies
Relevance 53.3%

The query needs to delete a record from a table based on input from a form.

I first made a select query, which found the exact records that needed to be deleted based on the criteria from the user inputs on an open form. Once I confirmed the query was returning the correct records based on that the user had entered, I converted it to the delete query.

When I run the query in design view (having the form open in the background, so it can pull the necessary values) it works fine. The correct record is deleted successfully. But I need this query to be executed by the user from the form where they actually enter the criteria. When I put a button on the form that would allow someone to run this query directly from the form itself, I get an error saying "There's no field named listSub in the current record." listSub is the name of a list box that's providing one of the criteria for the query.

Why does this query work perfectly well by itself, but the moment I try to make it part of a form it breaks?

Thanks in advance. Please let me know if you need any additional info.

Answer:Solved: Access 2007 query works alone but not in a form

6 more replies
Relevance 53.3%

This question was asked by someone several years ago, but I did not find the complete answer.

I need to know how to create a QBF using a date range as part of the criteria.

I have a form to run a query. The form has a combo box to limit "approved" or "pending" “new” purchase orders (PO) (criteria one), but I would like to add a second criteria for POs created between "07/01/2009" and "07/06/2009" (criteria two).

I want the end-users to be able to select the date range (enter the start date and end date). I don't want to limit their selection.

I know how to use the date range in "Design View" of a query (ex: >=[Start Date] And <=[End Date], or,
Between #07/01/2009# and #07/06/2009#) but I don't know how to implement that into the Form.

I know I need to put something like the following in the query criteria field for PO_Created_Date:

Between [Forms]![Formname]![BeginningDate] And [Forms]![Formname]![Text_EndDate]

But how to make it work in the form?

Please help!



Answer:Access 2003: Query by Form using a date range

Yuan, welcome to the Forum.
You appear to understand the query requirement, especially the "Between [Forms]![Formname]![BeginningDate] And [Forms]![Formname]![Text_EndDate]" part.
So which part don't you understand?
as long as the you put in the name of your Form in the Fromname brackets and you have 2 fields on the form called BeginningDate and Text_EndDate that Criteria will work.

3 more replies
Relevance 53.3%

I am doing an employee evaluation form in a personnel management database. I want to have criteria listed with check boxes and each item having a value of 1 for true and 0 for false. I want to count all the "true" or checked of check boxes for a total score for the evaluation.

Can't decide how best to approach this -by calculating a count text box on the form itself, or by creating a sum field in the query. I would do an IF statment in Excel, If the value is true, return 1, or something to that effect. I could use some advice. I'm just not seeing this clearly, and I need a simple way for the reviewer to click through the criteria and end up with a calculated score

Answer:Access 2007 query and form calculation with checkboxes

6 more replies
Relevance 53.3%

I have a report which requires a parameter be entered. I am trying to create a list box with the parameter selections. I have created a form to use, and have entered what I believe is the correct info into the criteria row of the query ([forms]![Parameter Form - Employee]![Name]). When I run the report, the normal dialog box displays with the "Forms!Parameter Form - Employee!Name". What am I doing wrong?

Answer:Solved: Access 2003 Parameter Query Form

12 more replies
Relevance 53.3%

Hi all,

I have a form that contains 4 text boxes. Each of these text boxes are used to search for countries in 4 different tables and are pushed into a query to help show me the desired content. My four tables are document, name, language, and origin. And there are always two field, student ID and Countries. In these four tables students can have multiple records so a student name might show up as Canadian and French.

I am hoping that the text box searches could be independent and overwrite each other when necessary. Currently if I set one text box to search a country within my Document table, that result will hinder further searches in my name Table.

I want to be able to pull results for everything I'm asking for. Such as looking for students that has a French name but also have Canadian documents regardless of their name.

On top of this I am hoping to be able to search multiple things within a text box at once. Such as looking for students with French and Japanese names and at the same time looking for students with Chinese and Canadian documents.

I've been researching for days now and I still do not have a solution. Is this possible?

I'm a bit of a newbie with access so forgive me if anything is not clear.

Answer:Microsoft Access 2013: Form Text Box Query Help

I'm not sure how one runs searches 'at the same time'. The best of us can only run and process one query at a time?

I'm thinking if the 4 tables were joined to Name (show all records from Name table and) on StudentID any search on name should return all records available.

Tip: in the query (of the joined tables) the criteria for name should be
"*" & [forms.formname!StudentName] & "*"
this will allow just typing a few letters of the name to return records.

2 more replies
Relevance 53.3%

I am the IT intern at the North Carolina Zoo in their Systems and Networks Dept. and I am trying to fix a database (MS Access 2003) used for the Rangers. My background is in java, javascript, and html, and I am a newb in those 3. however, I have never used or seen visual basic.

I am attempting to get a combo box to show a certain list based off another combo box (ridiculously easy concept + psuedo code) and i have been successful in getting the sub query of the combo box to work with the other combo box.

The first combo box is named: Incident and the combo box dependent on the incident box is named: Categorized Incident. But when I attempt to select a certain item from the 1st combo box in the main form, it is asking for me to: enter a parameter value. And in the pop-up it says:

Forms!Communications Incident Log!category
[_____text box here____]

Communications Incident Log is the name of the form.

Any help with why the combo box dependency works in the subquery by itself but not in the main form would be super helpful.

More replies
Relevance 53.3%

Hi all,

I have problem with query a date range... I know how to use in "Design View" of a query (ex: Between #01/01/2004# and #05/07/2004#) but I don't know how to implement that into the Form, for eg: In Criteria: Between (Forms!FormName!From_textbox) And (Forms!FormName!To_textbox) but it just returns nothing...

Please help!


More replies
Relevance 53.3%

A while back you (I don't remember the exact members) helped me create a query by form in Access 2000... Thank you. Now I need to know how to create a QBF using a date range as part of the criteria.

I know how to use the date range in "Design View" of a query (ex: Between #07/01/2004# and #07/06/2004#) but I don't know how to implement that into the Form.

As an example, I would want to pull all records of "Apples" (criteria one) sold between "07/01/2004" and "07/06/2004" (criteria two).

Please help!!!

Answer:Access 2000: Query By Form Using A Date Range

7 more replies
Relevance 53.3%


Looking for some help as I am really stuck.

I have a form where the user enters data and then when they hit a button an update query is performed based on the record ID. However for some reason the query is not pulling the record id through when the button is pressed.

The query runs fine when the button is clicked as Ive tested it and if I have the form open and run the query manually it pulls through the recordID and works perfectly so I don't understand why it's not working.

I have noticed however if I run the query when the form is in design mode it doesn't prompt me for the value??

It's probably something glaringly obvious but I've done this so many times and never had an issue.

Any help would be gratefully appreciated.

Thanks so much


Answer:Access 2003 - Query not pulling criteria from form

16 more replies
Relevance 53.3%

Evening all,

I'm very new to VBA and am struggling badly with this one. I'll explain what I need to do as the title is a little unclear!

I'm making an insurance calculator for classic cars, and on my welcome screen I have a button called lablled Edit Existing Quote. What I would like this button to do is, upon clicking, ask the user to enter the Reg Number (the PK in my client data table) of the client whos details they wish to edit. Once a reg number is entered and submit or something has been clicked I want that record to then appear in form view.

I've got as far as the:

DoCmd.OpenForm "frm_New_Quote", acNormal

(The form is named so because I use it to add new data as well, using the 'DoCmd.GoToRecord , , acNewRec' code, the form otherwise shows client data for the last record entered.)

I'm guessing it'll involve vbQuestion somewhere in there, or possibly some SQl...I'm really not sure. I only have a very basic knowledge of VBA and the two lines I've pasted there are about all I know! I'm staring at my VBA book but failing to find the relevant pages.

So, can anyone help me out with this one? It should run like :

Click 'Edit' button on welcome screen, then little box pops up asking for reg number, then that clients details is presented.

Please help!

my client data table is called 'Client Tbl' at the moment.

More replies
Relevance 52.89%

I am a newbie to Access and have created a simple database to store postcode and truck information. So that when the end user picks a postcode and truck rego combination, the form returns a rate from the query I created earlier. So essentially the form is not collecting data, but used as the 'search' criteria for the form. Unfortunately I do not know SQL. Can someone please help? Thank you

Answer:How to create form in Access 2007 to return Query result

newtoaccess, welcome to the Forum.
You do not need any SQL, you only need to create a Form using the query you have created as it's Record Source.
Click on your query and then on the Main Menu click Create and choose Forms and create a form.

1 more replies
Relevance 52.89%

1. I have a query already built that doesn't have any criteria built into it, because the criteria can change with the type of information that a user is looking for.

2. Rather than have users who are not familiar with Access trying to input the criteria they need on a table into the design view of a query I would like to utilize a form.

3. I would like to find out if it is possible for a user to enter the criteria they are looking for in fields on a form and have a table open with the records that match that criteria when the user clicks submit on the form. (To me it is kind of like parameter queries. But, I just want it in a form instead having the query asking the user one question at a time.)


More replies
Relevance 52.89%

Hi guys

Am having pain with the definition of a referece to a control that I can use in a query:

Mainform has subform and

Subform has sub-sub form

When I'm in sub-sub form, I wish to take 4 values from it for the current record and enter them into a temporary table so I can do stuff with them.
The Main form is called frmClients
The Subform is called frmClientsProjects
The SubSub form is called frmClientsProjectSubform

I need therefore to run a query that says:

"Make a new table and put in it values "A", "B" and "C" from frmClientProjectSubform WHERE "A" = value of Control "Z" on frmClientsProjectSubform

Im using Z as the current [Forms]![frmClientsProjectSubform] record identifier.

I thought it should be [Forms]![frmClientsProjectSubform]![Z] but its throwing a parameter dialogue box up asking for [Forms]![frmClientsProjectSubform]![Z].

What might be wrong here?

Hope you can help.


Answer:Access 2003: Form Control Reference in a Query Criteria

16 more replies
Relevance 52.89%

Hi All

I am trying to achieve a two things.

1) Is to transpose a single record Query-A of 'column' Table A.

The purpose of Query-A is bring into Form-D from table A the assigned column names/titles that represent the columns of Data Table B in Query-B. This Query-A is then to be used in Form B to label the Columns of Query-B using Query-A.

2) In Form C I want to select from a table 'lookup list' and have the selected record, trigger the Form-D and associated Query-A and Query-B.

Am I insane??


Answer:Transpose Single Record Query. Plus form list selction to

16 more replies
Relevance 52.89%

I have a form that the user enters in the month and year.
text box 1 - month
text box 2 - year

I then run queries grabbing MTD - YTD data. I use these against an invoice date and have the field look like this - Month: Month([InvoiceDate]) with criteria [Forms]![Form1]![month].

The same concept for year.

This works great for for current year data but when I use it for prior year I have issues. I can use these and have the year be criteria [Forms]![Form1]![Year]-1..... works like a charm.

But when I try to grab Prior Year YTD data - so jan - april 2011 I use the same year criteria

and I use the month criteria of <=[Forms]![Form1]![month]

And it returns back also 10,11,12 months.

I tried changing the Form textbox to Standard with no decimals but it still brings those back. How do I get it to on grab 1,2,3 months and not grab 10,11,12?

Answer:Solved: Access use Form Text Box to grab month for query

Did you try using a quarter (i.e. Quarter: DatePart("q",[EnterYourDateFieldHere])?

Access automatically recognizes 1,2,3 months then.

2 more replies
Relevance 52.48%

Hi, this is probably a pretty basic thing, but I can't seem to find an answer. I have a query which references "Form1"; I want to filter the column in the query, "Business Unit", using a List box on a Form. Currently, the query references the Combo box on the form for the two different business Units, either "HS" or "VL", and when I run it for either one of them, it works great. But, I may want the query to include both HS and VL instead of just one, which is why I switched it to a List Box and set it to allow multiple selections, but when I run the query from the form, nothing is returned. Can anyone help me please? Thanks!

Answer:Solved: Access 2007 Query to reference multiple options from Form

7 more replies
Relevance 52.48%

Hi, I have a Form created with a text box called "SoldTo_Text"; the user will input multiple SoldTo numbers; I then want the query that is pulling from the "SoldTo_Text" box to bring back data for those multiple SoldTo's. For Example, user inputs 3 soldTo's (1111,2222,3333) then the query takes those sold to's and returns the other values I have set in the query, we'll say they are percentages, so then it would look like (spaces indicate new columns):

1111 3% 5%
2222 6% 8%
3333 8% 3%

Currently, my query works great when they input 1 soldto, but as soon as I try to put in another soldto with it, it doesn't work.

Any help is appreciated. Thanks.

Answer:Access 2007 Query a list of data from a form user input

11 more replies
Relevance 52.48%

MS access 2010 Populate query in a subform based on selection from combobox in main form

I have a Main form "ClientInformation" and it's datasheet subform "VisitResultsQueryForm"
I would like to be able to select a cliend ID in a combo box(searchCombo) on the main form and the fields on the subform autopopulate based on the selection on the main form.
The subform is based on the visitResultsQuery query.

on change for the searchcombo i have : DoCmd.OpenQuery "visitResultsQuery"
in the visitResultsQuery criteria for the Client ID i have : [Forms]![ClientInformation]![searchcombo]

so far it works but opens up a datasheet instead of populating in the subform "VisitResultsQueryForm"

More replies
Relevance 52.48%

I am creating a golf club database as part of my studies, I had a few issues previously which were resolved on here, thanks.

But now I have another drama, I have an update query "Category_Update" which updates information into a table "tblWinners". There are 6 possible entries. M - J, M - A, M - S, F - J, F - A, F - S, where M is male, F is female, J is junior, A is adult and S being senior.

I have a macro which deletes the current entries in the "tblWinners" table and a form which uses text boxes to update the table using the query. Prior to adding the macro, if an entry matching the data I try to input is present (e.g. Gender:M and Category: A already in the table) it will attempt to run the query, but fail because "Gender" and "Category" are primary keys in the "tblWinners" table. But if the data I input does not match an existing entry the query will fail, not even attempting (as in 'You are about to append 0 row(s).' as opposed to 'You are about to append 1 row(s).' and then failing due the the primary key issue.

Previously in my study i read that you need an entry to append to, but with the deletion macro there is nothing to append to and so it fails.

Any help would be greatly appreciated.


Answer:Solved: Access 2010 Update Query from text box parameters in a form

Normally Append Queries append to empty Tables without any problems.
So it would appear that you are not meeting the criteria that the Table needs to do the append with, does the query run on it's own when you run it manually.

2 more replies
Relevance 51.66%

I have a table with a field called "current fund balance" which is intended to be a data entry field. I have a query with multiple calculated fields. Both the table and query share a common field. I'd like to have a datasheet form to where data from the query and table are combined and have that field "current fund balance" be a data entry field. I'm having the hardest time figuring this out.

I've read a form/subform would work but I need to be able to see all the records at once. And so, datasheet with all fields would be best. Anyone have any thoughts?

Answer:Solved: Having a form field in Access to enter data based on a query with calculated

16 more replies
Relevance 46.74%

NOTE: I could not post code because I must be really careful to protect proprietary information.

I work in an assembly plant and I've designed an Access 2003 program to deliver a set of 4 crucial parts to the floor – all within a very narrow degree of tolerance. Further, the program integrates FIFO.

I’ve done this by assigning each of the essential measurements codes and then running a series of queries:

Query 1 identifies the oldest Part A by sorting the available parts by the date they were inspected then by serial number (to break ties) and delivering the TOP 1.
Query 2 identifies the oldest Part B that is compatible with that Part A using the same method.
Query 3 identifies the oldest Part C that is compatible with that Part B.
Query 4 identifies the oldest Part D that is compatible with the other end of Part A. I have the parts in this order because we can begin assembly if we don't have a Part D on hand, but we must have Parts A, B, and C.
Finally, query 5 simply pulls the information from those queries into one location for a report.
As long as we have enough stock, life is good; but the moment a match cannot be made, it blows up. I cannot figure out how to make it go back to choose the next Part A. I need to figure out how and where to add code to each query to tell it that if no stock is compatible with the Part A produced by Query 1, to go back and pick the next one in line.

Can anyone help? Is the way I've gone about matching parts completely... Read more

Answer:Access 2003 – Query Based on Query – need code to rerun earlier query

11 more replies
Relevance 45.51%

Win XP Home-Outlook Express 6

Obviously I have hit something which I can't figure out how to correct. When I open attachments in email to read, the attachment opens in the "save attachment as file"!

I just want to read the attachment and then deleat the email.

How do I correct the problem? I am sure this is something fairly simple.

Thanks in advance for advising a simple Mind!!

man of marin

More replies
Relevance 45.1%

Hi there,

I'm very new to access and I hope I will get the simplest solution on my question below.

I have a table named "PurchaseOrder" and I'd want to create a query that will display the invoices that will due.


PONo Customer Quantity SalesPrice InvoiceDueDate
3241 A 421 $12 17-Oct-2010
6589 B 521 $19 14-Oct-2010
2234 C 987 $32 15-Oct-2010
8697 D 888 $88 18-Oct-2010

I want to create 2 queries.

The first query will display all the invoices that will due 5 days before the exact due date.
The invoice due date is 15-Oct-2010. The query will display information on 3241, 6589, and 2234.

For the second query, I want to display all the invoices that have exceeded the due date. The information on the respective invoices will be transfered from the query as mentioned earlier to the new query.

The scenario is as below:

Date: 16-Oct-2010


PONo Customer Quantity SalesPrice InvoiceDueDate
3241 A 421 $12 17-Oct-2010
8697 D 888 $88 18-Oct-2010


PONo Customer Quantity SalesPrice InvoiceDueDate
6589 B 521 $19 14-Oct-2010
2234 C 987 $32 15-Oct-2010
Date: 18-Oct-2010


PONo Customer Quantity SalesPrice InvoiceDueDate
8697 D 888 $88 18-Oct-2010


PONo Customer Quantity SalesPrice InvoiceDueDate
6589 B 521 $19 14-Oct-2010
2234 C 987 $32 15-Oct-2010
3241 A 421 $12 17-Oct-2010
Hope someone can help me with this. Really appreciate and hoping for ur help.


Answer:Query Access 2007 (how to transfer data from a query to another query)

The first query needs the following first Criteria Row of the InvoiceDueDate
between date() and date() + 5
The second query needs
< date()

I haven't tested it, just worked from memory. so let me know how it goes.

2 more replies
Relevance 45.1%

I just installed Outlook 2003 for one of the users on our corporate network as part of Office 2003. The user gets this message "A program has the file attachment <SUBJECT OF EMAIL> open. Changes to this document will be lost unless you save your changes to another file by clicking the File menu of the other program, and then clicking Save As."

This happens when the user is viewing emails using the Reading Pane and then clicks onto a different email. The strange thing about this is the email does not have any attachments and no other programs are running.

The OS is Windows XP and the user connects to our exchange server locally using an exchage account.

I will attach an image with as much detail about the problem as I can without violating confidentiality.

More replies
Relevance 44.28%

I am using Outlook 2003 and my issue is that when I receive image attachments, I will see the paper clip icon next to the email in the inbox but when viewing the email the attachment is not there - it will however appear after a minute or two. This happens with emails I place in other folders too.

I am running CA AV and Firewall and have tride snoozing the AV to see if that helps, which it doesn't. I have also tried momentarily disabling the firewall - no help.

Any ideas?

Answer:Outlook Displays Attachment Icon but no Attachment

I'm almost positive that I've seen that happen with mail scanning software running. Try to turn it off completely for a test. Or look around for settings something like outlined here:

2 more replies
Relevance 42.23%

One day my laptop just displayed a blue screen n shut down when I was playing a game , when I switch it on it shows that it's on on the power button but display is blanc. When I connect it to a VGA it showed the starting Windows logo then stopped displaying properly that you can't get anything on the screen

Answer:Laptop screen not displaying , VGA not displaying aswell

Are you able to boot to BIOS and Safe Mode with the main display?

2 more replies
Relevance 41.82%

Hi all

I have a simple Access (2003) db which has a single form view with a subform. The main form is a record based upon a physical case file the subform only details actions past and future, a sort of event log.

I also have a continuous form which displays all upcoming actions sorted by date on all cases for a particular user so they can see just how busy they are likely to be for a particular period. What I would like to do is have an on click() property for the detail of the continuous form so that it opens the main form filtered by the record in the continuous form that was clicked. User can then update or add new events for that case before closing form and returning to the continuous form

Hope this makes sense

Answer:MS access open single form filtered by selected record in continuous form

coasterman, welcome to the Forum.
It makes perfect sense.
If you add a Command Button to the Continuous Form and after selecting the mainform select the "Open the Form and find specific data to display". This will give you the code that you need to add to your On Click or On Double Click property or of course leave the button and use that.

2 more replies
Relevance 41.82%

Hi All,

Noob first-time poster I'm afraid!

I'm new to Access 2007 (but have used 2003 & 2000 reasonably extensively).

I'm building an App and have created all the necessary tables, as well as creating the relationships in the Database Tools area (which I know are correct - I'm a SQL Server DBA in my day job)!

Anyway, it's an almost text book example of an employers and employees database; one employer having many employees (employerID is the foreign key on the employee table).

I have created an employer form (using the wizard) which is fine, but then when I add a button to open the employee form (selecting 'Open the form and find specific records', matching employerID on the Employer table with EmployerID on the Employee table) it doesnt work. Instead, I get a popup box asking me for the EmployerID! Even if I manually enter the correct employerID when the popup box appears it actually displays all records, so I'm sure that the problem is more fundamental (and therefore, probably my fault)!

I'm hoping that I've just overlooked something REALLY stupid, but would apprecaite any suggestions!


Answer:Access 2007 Form Button Wizard - Form does not open with the correct records

I have seen this kind of problem with Access 2007 VBA code which does not work when it dod in 2000-2003.
It can be a Syntax problem which you may be able to get around, if not you can get around the problem bby using a Criteria in the Query that supplies the Employee Form.
Although I would have thought it would be better design wise to have the Employees as a Subform or Tabbed Subform on your Employer Mainform.
I do not have Access 2007, only 2003 so I can't help with the VBA, but you could post the code anyway.

Did you use a Wizard to create the Employee Form, if so check the Record Source SQL it may be preventing your EmployerID from working.

1 more replies
Relevance 41.82%

I sent to look at my Sent Items tonight and to my surprise I saw another email apparently sent yesterday that I definitely didn't send.

I was astonished to find this as I have just upgraded to Vista in the last 2 days and have sent minimal emails.

The subject is "Form posted from Microsoft Internet Explorer." & is sent to a Hotmail account. The attachment is a POSTDATA.ATT. When I look at this file in txt format it has info such as one of my email addresses, my website & description - as if I had filled out a web form & pressed Submit.

Now, thinking about it, shouldn't IE let you know that it is about to send data?

One strange thing is that the email is dated yesterday evening in the Sent list, but when I open the email to view it, it will always have the current date & time - seemingly from the Windows clock.

I am thinking that either

1) this is due to a bug in the new IE & yesterday I visited a website which submitted data via email without my knowledge or

2) this email is an old email that I Imported from backed up email (PST format) from a form I ACTUALLY sent that Internet Mail has redated - maybe something went

Sorry for the long post but I'm just wary, hope it makes sense! I was liking Windows Vista so far!

Answer:Sent Items: Form posted from Microsoft Internet Explorer. - I didnt submit any form!

I have moved this to vista forum as I believe it is more likely to be a vista live mail issue

3 more replies
Relevance 41.82%

Hi all. I do have another post going but do not want to cram so many questions in one post. (Hope that this is an acceptable practice )Anyway, my Sony desktop crashed the other day. I had a new Hard Drive installed and recovery disks were used. PC is good to go. Trying to tweek it back to the way I am used to having it.QUESTION:I had a form filler program called ROBOFORM on this PC before it crashed. I had MANY years of passwords and stuff saved there.When I brought this PC to the Geek Squad at Best Buy the other day to see if the PC could be repaired, I was told the hard drive went. They were, however, able to make a disk with my ROBOFORM passwords. I can not get the disc to open the list of passwords. It asks me where I want to open the and give me a list of choices. (Paint, notepad, adobe etc.) None of them will run/open the files so I can see them.This was a program that I paid for. How can I make the disc start to fill my forms again when I am at certain sites? (Gee, hope I am making sense)I just realized I never downloaded the ROBOFORM program onto this pc.  Does that have anything to do with the disc not opening??If I go and download ROBOFORM, how does it know who I am. How will it know about the disc full of passwords? How do they recognize each other?HELP PLEASE..........My Passwords are VERY important to me.Thanks!!

Answer:ROBO FORM / Form Filler - Help Needed Opening/Running a Disc

Yes. I know the website but what do I do? Will they know my info or do I need to pay again. I am lost.(Sorry)Dee

6 more replies
Relevance 41.82%

thanks for taking a look at this thread, any help will be greatly appreciated by a complete Noob.

I've been given a LOT of help by members of this Forum (especially OBP) with a DB I'm making as a first look at any type of IT product, and I'm very grateful, so thank you all.

Recently, I was advised to take a look at the "Tabbed" style of "MainForm" instead of the "Switchboard" style I originally used. I must say, I really like the tabbed style much more than the switchboard but I've hit one hurdle that I can't seem to overcome.

In the Switchboard style, I was able to set a form to load in either DATA ENTRY = YES or DATA ENTRY = NO mode depending on which sub-switchboard the user selected. For example, I had a ENTER NEW sub-switchboard that all forms would open in DATA ENTRY = YES mode & I had another EDIT EXISTING sub-switchboard that all forms would open in DATA ENTRY = NO mode.

However, with the new tabbed style, I cannot set the form load type for separate tabbs, it will only accept the LAST type as the GLOBAL type. Example, on the ENTER NEW tab, I set the form to load as DATA ENTRY = YES & sets the form to open in DATA ENTRY = YES on both tabs, then I go to the EDIT EXISTING tab & set the same form to DATA ENTRY = NO & it sets the form to open in both tabs in DATA ENTRY = NO mode.

So, my question is:
Can I set the same form to load differently on different tabs on the same MainForm?
If so, w... Read more

Answer:Solved: MS Access - Tabbed MainForm - How to make a form open a form in multiple mode

I would just copy the Subform, so you have version 1 for data entry with the Data Entry set to "Yes" and version 2 set to "No".
The only thing you need to do then is to Requery the Editing form each time you make an entry in the data entry form.
Although I prefer to just have an Edit form with a "New Record" button for the data entry.

2 more replies
Relevance 41.82%

My multi item form isn't letting me add new records, only update and delete current ones.

My guess it that this is because the form is based on a multi-table query. That's fine, I can make a new form specifically for adding new records, but I'd like to be able to salvage this form if possible. Is there any way to either force this form to accept new records in the bottom row, or is there any way to get rid of the "add record" bottom row completely so it's not misleading users into thinking they can add records here?

Thanks in advance.

Answer:Solved: Access 2007 - multi item form (continuous form) trouble adding records

16 more replies
Relevance 41.82%

I have a database which ultimately will have a couple of thousand records. The primary table has 30+ fields. I have lots of queries and connected reports to show various subsets of the data needed from the table. However, there are times when what is needed is all fields for a specific subset. Because the records sought often need to be filtered by several criteria, I've found the "Filter by Form" option to work well. I have a button on the main dashboard marked "Find Record" that automatically opens a search form in the "Filter by Form" mode. This allows me to enter information into as many controls as necessary, and returns exactly the right records after clicking on "Toggle Filters" on the ribbon. The problem is that ultimately I need to make this "Access-free". The goal is to create an application from the database without ribbons. I've created a button to run the filter, and another one to print the results, but when the search form is open in the "Filter by Form" mode, it greys out the buttons. I understand that there is a GotFocus command or something similar. Can anyone help with specifics, both the syntax of the command and where the command needs to be typed? Thanks a bunch...I look forward to your reply.

More replies