How To Refer To A Single Detail Record, Not All

Feb 17, 2005

hello. can i refer to a single record in a detail section, and not all of them? for example if i use something like this (after update in field1):

if me.field1 = 0 then
me.field2.enabled = false

any single field1 equal to zero will disable ALL of the field2's. i would like this to work within each record independently.

View Replies


ADVERTISEMENT

Forms :: Refer To Detail Section Of A Subform From Another Pop-up

Jun 29, 2014

I have a 'master' navigation form called 'NPYWC'

On it, there is a subform called 'patient' - this has a number of subforms in the detail section (Linked on a one-to-one key).

When the patient form loads, I hide the detail section until a user either

A. Finds an existing client record or
B. Clicks the 'ADD NEW' button

The ADD NEW button opens a separate (pop up) form where the primary patient information is gathered. When the user clicks "Save" on the pop up, my VBA script ...

A. Creates all the one-to-one relationships that are required.
B. Updates the 'Find Patient' field to the newly created patient number
C. Finds the new record
D. Un-hides the detail section (This is what I cant get to work)

I have tried a number of things. The latest being

Forms![NPYWC]![NavigationSubform].Form![Section].[Detail].Visible = True

The rationale for hiding the detail section in the first place? The answer is twofold.

1. If the user simply creates an new patient, the three actions (A, B C above) don't always run/display the data properly. (Im not sure why? ) The pop up form seems to be a good working solution for me.
2. My users have a tendency to change data on the default patient. I have tried going to new record, but then they add new (often duplicate) patient records.

View 3 Replies View Related

Refer To Previous Record In Current Record Query

Sep 15, 2005

In my query, i want to automatically display the value of another field from the previous record in a field in my current record. i.e.

Name Value Previous
Record 1 1
Record 2 2 1
Record 3 7 2
Record 4 1 7

Is it possible to create some kind of simple expression to refer to data in another record?

Cheers,
Ben

View 6 Replies View Related

Reports :: Print Out Single Page Reports (or Forms) To Show Detail From Several Tables And Queries

Apr 21, 2014

I have a database of high-school football players, and I am looking to print out single page reports (or forms) that will show detail from several tables and queries. This will act as their resume when they visit schools on recruiting visits. The reason for needing query items, is that I have developed queries that return the most up to date height, weight, 40 time etc., and that single most up to date number is what should print, not the entire table. When I try to build a report it will let me bring in multiple tables, but not queries.

View 2 Replies View Related

Modules & VBA :: Storing A Single Record In A Single Dimension Array?

Sep 8, 2014

Any Single line of code available?

View 2 Replies View Related

Modules & VBA :: Sending A Single Email To A Single Record In A Query

May 15, 2014

I am trying to create a form with a button attached to each record that would allow the user to click the button and it would automatically open outlook and fill in the TO:, SUBJECT: and BODY: fields. Here is the code that I currently have:

Code:
Private Sub Command33_Click()
Dim strEmail As String
Dim strMsg As String
Dim oLook As Object
Dim oMail As Object
Set oLook = CreateObject("Outlook.Application")
Set oMail = oLook.CreateItem(0)

[code]...

There are two issues I keep running into:

1. This code opens outlook and populates all of the fields but pastes the email incorrectly. Instead of pasting just the email (email@email.com) it pastes the html tags as well (email@email.com#mailto:email@email.com#) which means that the user would have to delete everything between the #'s in order to send the email every time.

2. I currently have the email BODY pulling from a table but this obviously limits what I can do. I would like to simply encode the BODY within the VBA code. The setup I am looking for is:
one paragraph
a blank line
a hyperlink to a website
a blank line
another paragraph

View 9 Replies View Related

Queries :: Refer To Previous Record In A Query

Mar 29, 2015

I'm trying to refer to previous record in a query and i'm stuck as i do not know how to do it.

Here is my query:

Code:
SELECT
[Prod2Buy].[Product Code],
IIF([Missing] IS NULL,0,[Prod2Buy].[Quantity To Order]-[To Order]) AS [Rest To Order],
s.s_manu_code AS [Manufacturer Code],
s.prod_cost AS [Price Code],

[Code] ....

In fact the line: IIF([Missing] IS NULL,0,[Prod2Buy].[Quantity To Order]-[To Order]) AS [Rest To Order] should refer to previous record.

View 9 Replies View Related

Forms :: Refer To Specific Record In Continuous Form

Apr 15, 2013

I have a main form with a continuous sub-form. On the main form I have a series of text boxes that I want to use as a makeshift status bar. The text boxes would be filled in if a value was entered into certain records on my sub-form.The problem I have is since the sub-form is continuous, how would I refer to the specific record on the sub-form that I want to check for a value?

View 6 Replies View Related

Modules & VBA :: Apply IF Statement To Each Record In Detail Of Subform On Load

Jun 12, 2013

The problem I am facing is applying an IF statement to every record in the detail section of the subform.

I have the following code:

Code:
If Me.status = "CONFIRMED" Then
Me.course_ref.Enabled = False
Me.course_date.Enabled = False
Me.cmbModule1.Enabled = False
Me.cmbModule2.Enabled = False
Me.course_start_time.Enabled = False
Me.course_end_time.Enabled = False
Me.course_training_cost.Enabled = False
End If

This is in the on load event of the subform and works 'sort of'

Basically I have a record with the status of confirmed and records without this status, but the result of the if statement is being applied to all records. Is this because I need some sort of loop? and if so how would I loop through all records in the detail and apply this if statement to them all?

View 5 Replies View Related

Reports :: Showing All Detail Records If One Record In Query Meets Criteria

Mar 5, 2013

I am trying to create a report which basically includes the following:

Company, Wages, Contribution.

Each company reports wages for each employee every month. Then they also contribute to a general fund based on a percentage of the wages. For instance:

Company---Employee---Wages---Contribution
CompanyA---EmployeeA---$4000---$40
CompanyA---EmployeeB---$3800---$38
CompanyA---EmployeeC---$3800---$38
CompanyB---EmployeeA---$4200---$42
CompanyB---EmployeeB---$4200---$42

...and so on.

Each employee is required to contribute, in this example, 1% of gross wages to the general fund.

On occasion, the company does not pay in the required 1% of gross, say, for CompanyA EmployeeA, they only paid in $35.

Here is what I need to do. If any contribution amount for any employee is incorrect, I want to display all the records for that company, not just the incorrect ones. The report is grouped by Company, and may contain dozens of companies.

I am already passing a number of criteria to the report using a filter, including the date range and other fields which are informational.

View 6 Replies View Related

Reports :: Show Detail - Using Section Header As Hyperlink To Show / Hide Detail

Aug 13, 2013

I'm trying to create a report where I can use a section header as a hyperlink to show/hide detail, but only for that section. For example, my customer names are:

Code:
ABC Co.
ZYX Co.
123 Co.

If I click on ZYX Co., I want it to show the contracts for ONLY that customer:

Code:
ABC Co.
ZYX Co.
Contract 1
Contract 2
123 Co.

Right now, my code looks like this for On_Click:

Code:
If Me.Detail.Visible = False Then
Me.Detail.Visible = True
Else
Me.Detail.Visible = False
End If

But it shows and hides detail for ALL customers when I do this. Is there a way to only show/hide for the customer on which I click?

View 1 Replies View Related

Single Record In Table

Feb 22, 2007

Hi,

On our main menu table, I only want to be able to add one record.

On the form that I have linked to this table, should you press the tab key to go through all the items / buttons, it opens a blank record screen. However, I do not want this. Any ideas?

Thanks in advance

Lee

View 2 Replies View Related

Adding Single Record

Sep 5, 2005

I have 2 tables and a query to show the details of both tables on a form for an attendance database. The idea is that whenever someone is absent they have a record created.

tbl[Staff] has the following fields StaffID,Name,Team,Job Title
tbl[Absence] has the following fields StaffID, abStartDate,abEndDate,abIssue

I can set up the query to find the member of staff by name but I want to be able to use this form to add new records to the Absence table for each individual. eg I use the query to search for "Joe Bloggs" and the form shows the details from staff table and then use the form to add details to the Absence table.

Any help would be greatly appreciated

View 2 Replies View Related

Adding A Single Record

Sep 5, 2005

I have 2 tables and a query to show the details of both tables on a form for an attendance database. The idea is that whenever someone is absent they have a record created.

tbl[Staff] has the following fields StaffID,Name,Team,Job Title
tbl[Absence] has the following fields StaffID, abStartDate,abEndDate,abIssue

I can set up the query to find the member of staff by name but I want to be able to use this form to add new records to the Absence table for each individual. eg I use the query to search for "Joe Bloggs" and the form shows the details from staff table and then use the form to add details to the Absence table.

Any help would be greatly appreciated

View 2 Replies View Related

Append Query - Single Record

May 18, 2005

Hi,
I am trying to run an append query, but instead of appending the whole table, I would like to only append a single record.

I have an append query, and it works like a charm. I can also get it to work with prompting the user for a parameter (in my case LeaseId which is a primary key). When the user is prompted and enters the LeaseId it only appends the single matching record. Works like a charm.

However, I don't want to prompt the user for the paramater. I want the user to generate the LeaseId based on the selections in two combo boxes.

So far the I do get the right LeaseId, but I have no idea how to actually pass the LeaseId to the query. I've tried the following, but I know it's completely wrong.


stDocName = "approveLease"
DoCmd.OpenQuery stDocName, acNormal, acEdit, "[LeaseId]=" & Me.buildingCombo.Column(0)


Any ideas on how to actually accomplish this?

View 12 Replies View Related

Single Record Preferences Form

Aug 13, 2005

I need to set up a preferences type form. What's the best way to accomplish this. Can I store this data in memory as a variable?

Here's what I need:

Customer Name, CustomerID.

I have been reluctant to put it in a table because this is the only data that I need.

Plx lead me down the best path.

View 3 Replies View Related

Find Record + SINGLE FORM

Mar 30, 2006

Is it possible to create text box for search for records if I use SINGLE FORM?
i try but without effect :(

pls see my database (I want to use for record "Title")

Thanks

View 2 Replies View Related

How To Select A Single Record To Do Calculations

Sep 28, 2015

I am trying to make calculations at a single record level. I have many products and I want to select only 6 of them, which I just found out that I can do it by their SupplierID. then I have a query that finds the amount of pcs that I have for each product. The aim is to determine the final weight of this 6 products. So to start I need to find the weight of each individual product by multiplying the number of pieces (from the query) by the weight of a single piece. Obviously each product weights differently, and at the end I need to add all the weights of the individual products to make the total weight of the 6 products.

don't know how to approach the problem of selecting a single record. And also I don't know what would be best to do it in a query, a form or a report.

View 8 Replies View Related

Possible To Validate A Single Record In A Field

Aug 19, 2014

I've done some looking into how to validate in Access and I found how to do it for an entire field but I was wondering if it's possible to validate a single record in a field.

View 6 Replies View Related

Print Out Single Record Onto A Report

Jan 7, 2015

I have a form NoWorkOrder, i have attached a command button to Print Report. The report is named No Work Order. When I'm viewing that a record in Form View and click the command button i want only that record to print out onto the report.

I'm using Ms Access 2010.

View 14 Replies View Related

Multiple Notes - Single Record

Jul 20, 2015

So I have a list of jobs and each job is subject to change from the original plan.

Each change needs to be documented and dated. So what I want is a form where the site can be selected and a note written. When this is saved, a record of the current time would also be needed.

The form aspect of this seems fairly straight forward to me. I just cant visualise where the 'notes' will be stored.

View 2 Replies View Related

Send Single Record From Form

Dec 1, 2014

I would like to be able to place a button on my invoice form that will allow me to e-mail the individual invoice to the person being billed (the e-mail address is included on the form). I created a macro that works to send a PDF file of all of the records and I am having trouble figuring out how to send just the current record. I would also like to have the e-mail address automatically populated based on the e-mail address on the current record.

View 3 Replies View Related

Collate Single Record Report And Existing Pdf

Aug 15, 2007

Hi all. Using Access 2003 I am trying to figure out how to print and collate a report and an existing pdf file that is opened based on a field in the record. I figure that it probably has to do with looping through the records but I am not very good at that.
So I have a form with a sub form that opens records based on a combo box. I then have a report (a checklist sheet) that prints 1 page per record. I would like to print a pdf file associated to that record before it prints the next record.

Here are the names of the objects being used:
tblMoveDoc
frmMoveDoc
subfrmMoveDoc
rptCheckList

Any help would be appreciated.
Thank you,
Matthew

View 4 Replies View Related

Charting Multiple Values From Single Record

Feb 11, 2008

This particular database generally looks at reporting individual records as opposed to summary reports. So for a particular data record i have the following data [x1][x2][x3][x4][x5][y1][y2][y3][y4][y5]

I need to chart (scatter) these figures as paired x,y variables for display on a feedback report such as

x1,y1
x2,y2
x3,y3
x4,y4
x5,y5

For some reason i simply can't wrap my head around haw to make this happen.

Many Thanks in advance for any help.

Cheers
ndeans

View 2 Replies View Related

Excluding A Single Specific Record Among Many Records

Sep 13, 2007

Hello Query Expert

Hi I would like to exclude two specific records from my recordset.

For example suppose I have a Flights Database and I want to see all the flight records for Aircrafts 132 and 232 only, between the date jan 1, 2007 to Sep 12, 2007.

The above I know how to do achieve...

([FltNum] = 132 or [FltNum] 232) AND ([FltDate] >= Jan 1, 2007 and [FltDate] <= Sep 12, 2007)

However, among this set of records I want to exclude flight 132 on Aug 1, 2007 and flight 232 on Sept 1, 2007.

([FltNum] = 132 or [FltNum] 232) AND ([FltDate] >= Jan 1, 2007 AND [FltDate] <= Sep 12, 2007) AND NOT ([FltNum]=132 AND [FltDate] = Aug 1, 2007 ) AND NOT ([FltNum]=232 AND [FltDate] = Sep 1, 2007)


I haven't been able to accomplish this using the query grid. Is it possible or do I have to write SQL?

How would you write this in SQL?

Thanks so much.

View 4 Replies View Related

Emailing Single Record From A Rather Large Form

Feb 28, 2005

Hi fellow Access battlers!

I've searched high and low on this forum on a step by step on how to do this and everyone's answer is either vague and assumes everyone is an access wizard, or really complex and codey and assumes every one is an access wizard!

I have a "lead sheet database" and I need to add a button on the form which emails just the contents of that current record. My company still handwrites these lead sheets and faxes them to consultants so I'm trying to bring them into the 21st century! An uphill struggle. I'm a code and VB newb by the way.

I've tried sending the form to a report as other posts suggest, but I get an error message about there being too many fields. So I'm stuck. All I need is for each form record to be emailed to a different consultant each day.

(I've had to rar then zip the database file due to size restrictions. I couldn't get the files size down enough by just zipping.)

Thankyou!

View 3 Replies View Related







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