Setting A Field In A Query From A Report?

Oct 6, 2004

I know its probably a simple one but I am new to access, so...

I have a simple membership database and in it I keep a record of who I am expecting to attend on a particular date. This is achieved through having a seperate field for each meeting on a simple yes/no type.

I would like to be able to print a report from a form for a particular date showing everyone that would be attending. I have a list box that shows all the fields. What I cant do is set the date I want in the query from the report, can anyone help?

thanks

View Replies


ADVERTISEMENT

Setting Up Calculated Field In A Report?

Jul 8, 2013

I am "OK" when it comes to figuring out a formula in Excel, but Access is much different for me. I am looking to set up a calculated field in a report.

The result is find the Client-to-Staff ratio but there are two possible conditions:

CONDITION 1: If VacantFTEE = 0
ActiveClients / (DirectFTEE + DetailedFTEE + ProvidedFTEE)

CONDITION 2: If VacantFTEE > 0
ActiveClients / (DirectFTEE + VacantFTEE + DetailedFTEE)

I am presuming I need some sort of IF/OR statement to make this as 1 formula, but I can't seem to make it work.

View 11 Replies View Related

Setting A Format In A Field In A Union Query

Jun 21, 2007

Hi everyone,

Please would someone be able to help me?
I have created a union query however, one of the columns, has not picked up the same format as it has in the tables. As in the tables it has this format
'00000'.

Please woud you be able to advise me how I can change the format on one of the 'columns' in my union query. As one column is 'numbers' and the other is 'text'. I need to change the number column so the format is '00000'.

Thank you in advance for your help.

Nats

View 5 Replies View Related

Simple Query Question: Setting A Field To A Set Value

Jul 6, 2007

Putting this in the field box in a query:

read or write: "r"

should create a field called read or write with a value of r in each record in the query, shouldn't it?

Why doesn't it, and how can I make it work?

View 2 Replies View Related

Queries :: Setting To Only Show Field In Simple Query Once

Sep 19, 2013

I have a simple query between two tables joined together by common fields. In my first table (Table 1 - tblLocations) I have information about a building i.e. Location Code, address and total sqft. . In my second table (Table 2 - tblAllocatedSpace), this contains details (Location Code, Room ID, SqFt assigned, etc.) of the space allocated in each building. The two tables are joined together when the “Location Code” in both table match.

In my query, I show the location detail from (Table 1 - tblLocations) and related records from (Table 2 - tblAllocatedSpace). My result looks like the following:

Location Code Sqft Address Assigned Sqft
106067 1,000 600 March Rd 10
106067 1,000 600 March Rd 15
106067 1,000 600 March Rd 12
106067 1,000 600 March Rd 20

The location code, Address and Sqft is rebated each time a space is assigned in (Table 2 – tblAllocatedSpace). When a build a report and need to sum the location Sqft, the number is multiplied by the number of related records in (Table 2 – tblAllocatedSpace). In this example by building total space is 4,000 sqft when I only it to show 1,000.

How do I set to only show the location code and sqft once?

View 1 Replies View Related

Setting Out A Report

Apr 10, 2006

Hi

I have 6123 records in a database.

I need a report that prints the Customer ID and the Postcode

I have managed to do this but it comes to 196 pages!

Is there n e way i can format the report so instead of it being like this:-

Customer ID Postcode
2334 LS89 8UJ
2333 BD67 990

It displays multiple lines on each page .eg

Customer ID Postcode Customer ID Postcode
2334 LS89 8U 2354 LS69 8YH
2333 BD67 990 7899 BH78 6NQ

Can anyone help??

View 5 Replies View Related

Reports :: Setting Report Parameters

Jul 16, 2014

I have an report that uses name paramaters.this is the sql for the report

Code:

PARAMETERS [whatCompany] Text ( 255 );
SELECT tblInvoices.ClientCompany, tblInvoices_Details.Charge, Sum(tblInvoices_Details.Hours)
AS SumOfHours, tblInvoices.InvoiceID
FROM tblInvoices INNER JOIN tblInvoices_Details ON tblInvoices.InvoiceID = tblInvoices_Details.InvoiceID
GROUP BY tblInvoices.ClientCompany, tblInvoices_Details.Charge, tblInvoices.InvoiceID
HAVING (((tblInvoices.ClientCompany)=[whatCompany]));

How do I pass the paramaters to the report? I've tried several different ways but can't get it to work

Code:
Dim stdocname As String
Dim stLink As String
stdocname = "RptWithParm"
stLink = "ClientCompany = " & "'" & Me.lstCustomer & "'" 'Using the field name doesn't work
DoCmd.OpenReport stdocname, acViewReport, , stLink

'When I try to set the value of the paramater that doesn't work either
stLink = "[whatCompany] = " & "'" & Me.lstCustomer & "'" 'using the paramater name doesn't work
DoCmd.OpenReport stdocname, acViewReport, , stLink

I know I could use the value of the form in the criteria like this

Code:
HAVING (((tblInvoices.ClientCompany)=[Forms]![frmTesRptParm]![lstCustomer]));

If I use the list box as the criteria I want to be able to use reports in other than one place, plus there are over 80,000 records and it'll run faster if I set the criteria before the report opens instead of setting a filter after it opens to only show up to about 100.

View 1 Replies View Related

Unbound Report - Setting Control Values

Oct 25, 2005

I have a very simple report - just one field.

I have a Form - "Cases". The button to open the report is on that form as are the values I want in the report.

I want to pull the value of Case Name and Case Number from the current form view and put them together in the single field on my report.

I can "almost" do it. Then VBA gives me a warning - it says that you can't assign a value to the control on my report.

Can anyone give me any ideas?

by the way:
I chose to make this an unbound report because I'm using SQL server as my back-end and my Access is an .adp file. SQL (so I was told by the programmers at work) can't pull in variable criteria from a form like Access Queries can. So this all has to be put in VBA.

View 5 Replies View Related

Modules & VBA :: Setting Focus On A Control In Report?

Sep 24, 2013

Windows vista
access 2007

I'm populating a report with a query which pulls criteria from a form. When the 'run' button is pressed it opens the report, running the query, to filter the data. What i'm attempting (and it works if there is data present).

The data is text, which is a filename, which populates an image control. Most of my records have an image present but for the ones that don't I think I need to turn the image control's picture property to 'blank'.

I'm just now encountering problems with the records with no pictures so when i came up with this it worked with my tests which at that time only had images present....

I have two problems.

1) When I run the code as below i get Run-Time Error 2185; you can't reference a property or method for a control unless the control has the focus.

2) when i try to set the focus on the picture control in the report to see if there is text/value present i get runtime error 2478; database doesn't allow you to use this method in the current view.

I assume this is talking about me opening the report in acViewPreview mode but i thought i needed to do this so the images are displayed in the image control.

Code:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim strDBPath As String
Dim strRelativePath As String
Dim strPath As String
'rptOriginalOwnerCategoryItem!Picture.Text.SetFocus
[B]Me!Picture.SetFocus[B]
'Test to see if the record has a relative path stored

[code]....

View 4 Replies View Related

Tables :: Numeric Field In A Table - Setting Field Property?

Nov 16, 2013

I have a numeric field (long integer) in a table. I've set the format to fixed. No matter what I set the decimal places to, auto, 0 or 2, when I enter a value of 0.71, it displays as 1.00

In my form, I've also set the field property to fixed, but it displays the value as 1.

View 2 Replies View Related

Setting Up Good Report Menus For End Users - A Lot Of Reports!

May 25, 2005

I am working on stream lining reports for my application, so that I don't have a huge maze of menus.

I am open to any ideas of how to best set this up. Right now I have a report menu with about 8 command buttons. Some take them to a criteria form for that report, others straight to the report, and others to another menu with a whole other set of buttons for more reports.

I have looked at organizing the "categories" of reports that I have.

I see that I have Candidate reports and Hire reports. This is because this application is for people who apply for a job. Once the information is entered on the entry side, there are a number of things to report on.

One idea is to make a statistics report menu for all of the summary reports. These are counts of candidates under certain groups, like what office they applied to, what departmen, or what date they applied. Then these counts exist for hires as well, and what they were hired to, and what date they started.

I also have detail reports showing the people information as candidates or hires, grouped by these such factors.

If anyone can help me to organize the best method for making these reports available to the user, I would really appreciate it.

One thought would be a form with 2 combo boxes and a preview button.

I am thinking that this could work for the statistic report menu. My database is normalized, so I can't use their names in the combos. I would want to have 1 combo for choosing candidate or hire, as that report that they want. Then the next combo would be the factor to report them on. Office, department, application source, etc

I have summary report for candidates and for hires. parallel reports, but one for (ie) all candidates by the office that they applied to. Then I would have one for all hired candidates (were hired) by the office that they were hired to. Same with department, and many others.

If anyone can help me to either how best to do this process, whether my thought is a good way to go, or if there is a better set up that I should try. I am open to anything here!

Thanks. :D

View 1 Replies View Related

Modules & VBA :: Setting Filter Property Via On Open Event Of A Report

Dec 15, 2014

I have a report, on a control tab, on a main form.

On the form are two buttons: one to show all items, and one to filter them based on a boolean field called showitem.

The buttons work with the code below.

What I want to do but cannot seem to figure out is to have the report default to no filter.

The bound query has no criteria.

I'm trying to set the filter property via the on open or on load event and even if I isolate the report, cannot seem to reach it.

Code:
Private Sub b_hide_items_Click()
Me.Profile_Timeline_wNotes_subreport.Report.Filter = "timeline.showItem <> 1"
Me.Profile_Timeline_wNotes_subreport.Report.FilterOn = True
Me.Profile_Timeline_wNotes_subreport.Requery
End Sub

Private Sub b_show_all_Click()
Me.Profile_Timeline_wNotes_subreport.Report.Filter = "timeline.showItem = 0"
Me.Profile_Timeline_wNotes_subreport.Report.FilterOn = False
Me.Profile_Timeline_wNotes_subreport.Requery
End Sub

View 14 Replies View Related

Reports :: Setting Groupings On Report - Count Of Defined Records

Mar 29, 2013

Report has records of errors. There are 3 types of error. In the report footer, I would like a total count (this is working!) and a count by type (can't get this to work).

Error Total =Count[ErrorType]
Compliance Total =Sum(IIf([ErrorType]="Compliance",1,0))
Audit Total =Sum(IIf([ErrorType]="Audit",1,0))
Quality Total =Sum(IIf([ErrorType]="Quality",1,0))

I have tried setting groupings on the report but this alters the detail sorting (currently sent by the date field newest to oldest) and provides the count within the detail.

View 14 Replies View Related

Reports :: Setting Subreport Source Object To A Report In A Collection

Apr 6, 2013

I am trying to join a number of reports into one report. I have a generic report which displays a different dataset given the user's choice on a form. I created a collection where I can store multiple instances of this report (called mcolReportInstances) - this works just fine.

I was looking to combine all the reports in the collection into one report. To that end, I have created a report with a number of subreport controls but with no sourceobject. In the On_Open event of this blank report, I am trying to set the source object of the subreport to one of reports in my collection:

Me.Controls("Child" & i).SourceObject = mcolReportInstances.Item(strKey)

However, it keeps giving me the error 'Type mismatch'.

View 10 Replies View Related

Modules & VBA :: Generate Report For A Test And Answer Sheet - Setting Title?

Oct 15, 2013

I'm using VBA code to open a query, generate a report for a test and an answersheet. I'm using the same report, and don't want to make many reports. I have the below code which runs my query, and generates the reports.

Private Sub Command2_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "1", acViewNormal, acEdit
DoCmd.OpenReport "WrittenExam", acViewPreview, "", "", acNormal
DoCmd.OpenReport "WrittenExamAnswerSheet", acViewPreview, "", "", acNormal
End Sub

I have a need to be able to set the report title for both reports when running my code.

View 3 Replies View Related

Setting Field Value To Table Value

Apr 4, 2008

I have tblDefaults that has only one record, containing default values. Next I have tblWebpages that has a Memo field that holds my html data. Lastly I have a Form called frmCreate with a field called Webpage. This Form is based on a tblCreate table.

Whenever I click a command button on my Form, I want to populate the Webpage field on my frmCreate Form with a template from tblWebpages. The template to chose will be based upon the WhichTemplate field in tblDefaults.

In brief, tblDefaults tells me which is the current webpage template and so the field should be populated with that html data.

Phew!

Thanks,

Jon

View 2 Replies View Related

Setting A Field As An Autonumber.

Aug 28, 2006

I am creating a table with a field named Payment ID. I want the table to increment the number of this field automatically when the user is trying to enter a new record, i.e. set the field as an autonumber.

I know that this is very basic, my MS Access skills is really limited.

Cheers.

View 2 Replies View Related

Setting A Field To Outstanding

Oct 11, 2006

Im not sure if this is the right area to post this but what i wanted to know is how i would set the field "status" to OutStanding when a record is added into the table.

View 2 Replies View Related

Setting Up A Lookup Field.

Feb 15, 2006

Ok I'll premiss this by saying it has been many years since I have done much with access so I have forgotten alot and alot of things have changed. However I have been using Dataease alot but switched companies so am back to access.In dataease if I had a form called projects and that form had three fields (employee ID, employee first name, employee last initial) that pulled data from another table other than the projects table I would relate them via the employee ID. projects form employee ID = employee form employee IDthen for the two other fields I would have them lookup their data by using the employee id.projects form employee first name = if (projects employee ID = employee employee ID) then lookup employee employee first name. And the same for the last initial.The question is how do I setup for fields for first name and last initial to do the lookup in access.Employee ID TableEmployee ID #Employee First NameEmployee Last InitialProject TableEmployee ID (linked to employee id table)project idproject nameproject discriptionproject start dateproject end dateproject formproject idproject nameproject discriptionproject start dateproject end dateemployee ID (must match employee table employee id)employee first name (read only field that looks its data up from the employee table based on employee id)employee last initial (read only field that looks its data up from the employee table based on employee id)

View 1 Replies View Related

Forms :: Setting A Value For A Field

Jun 25, 2013

I have two tables relating to People

PeopleType: ID and description (e.g. 1 student, 2 teacher, etc)
PeopleDetails: PeopleType.id, name, gender etc

I have a form that contains subforms

On the Main section of the form the data comes from the PeopleDetails. I want the user to fill in this but I want the PeopleType.id to be set to e.g. 2 so that you can only key in teacher details.

I have been trying to set it using a macro SetValue but i cannot get it to work.

View 2 Replies View Related

Setting Field To Null

Jan 28, 2013

I have a form to enter attendance in that pulls students from a StudentEnrollmentTable based on FacultyName which is selected from a combobox that runs the following code:

Private Sub cboInstructorName_Click()
Me.Requery
End Sub

A query (StudentAttendanceBYFaculty) is run each time a faculty name is selected. On the form their is a field name TempClassesAttended which is bound to a field of the same name in the StudentEnrollmentTable. Teachers will enter attendance data and run an append query to append the current form records to the StudentAttendanceTable. Each time the form is repopulated the most recent TempClassesAttended values are pulled into the form. This is what is expected.

Now I want to load Null values into the TempAttendance field on the form each time the Faculty selects their name and runs the event. I looked at code online and it seems easy enough, but I don't know enough to make it work. This is the code suggested:

UPDATE TableName SET FieldName = Null
OR
UPDATE MyTable
SET MyField = Null

how to include this into the current event so that the event will return the faculty records with Null values in the TempAttendence field.

View 14 Replies View Related

Setting A Field Default Value Through Code

Dec 17, 2007

High all.

I would like to know how to set a fields default value on a table.

Eg - i have a Yes/No field that and i want the default value to be set to 'Yes'.

I cant use the front end application because the form its on is a generic form used by about 30 other tables.

At present it is not set to anything and so always defaults to 'No' on the form.

Thanks in advance.

View 6 Replies View Related

Setting A Default To Equal Another Field

Oct 21, 2006

I have a membership database. A number of members go by their middle names or a nickname rather than their first name. I need to keep track of their real full names, but I want the new-record default of the preferred name field to equal the contents of the first name field. How do I set this in the table design? The table already has 1400 records, and it would be quite a job to manually copy each first name to the preferred name field, a job I would rather avoid.

View 5 Replies View Related

Setting Text Field Properties

Nov 11, 2006

Hi All,

I have only been playing with MS Access for a little while and I do not know all there is to know yet so I figured I come here to ask a question.

I use MS Access in web design and lately I have been experiencing a problem with my registration form which inserts new users into an MS Access database table.

Lately my registration form has become a target for spammers trying to inject spam in the form of html code into the password field of the online registration form.

I figured that I could deter this from happening by only allowing the letters A - Z and numbers 0 - 9 in the field and not allowing characters like < > and ? and ".

I assume I can do this with a validation rule but I'm unsure as to how I would go about setting this up. Limiting the field size to only 50 characters does not seem to work unfortunately.

Any help on how to set up a validation rule would be appreciated.

Thanks
Mechaworx

View 3 Replies View Related

Setting Field Widths In An Export

Aug 2, 2005

I have a query that I manually export as a dbf file (i.e. right-click and export). I manually export because I export to a unique directory each time. However, fields in the query that are of type string always get exported with a length of 255. Is there anyway in SQL that I can set the width a query's text field to a specific value (so that when I export it it isn't 255 characters long)?

View 1 Replies View Related

Forms :: Setting Combo Box Field

Nov 18, 2014

How do I go about getting data from a:

Text field in Form 1

Clicking a button to run VBA code, and Automatically inserting it into a refreshed combo box in Form 2

I've also attached a pic.

*Also, I'm using Access 2007...

View 5 Replies View Related







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