Conditionally Suppress On A Form

Oct 10, 2005

Hi all

Long time searcher, first time poster!

I have a subform which has loads of check boxes for each record but i want to suppress certain boxes depending on criteria in each record. I think i need to do a For..Each statement but, as my user name suggests, I'm buggered!.

View Replies


ADVERTISEMENT

New Form Instance - Suppress Record Retrieval?

Mar 11, 2005

Hi,

I build the WHERE clause in my form's record source dynamically, depending on the context in which the user opens the form. I can't put the WHERE predicates in the record source and refer to fields on another form, as the context will determine which predicates are required. So I have code like this:

Public gf_FormInstance As Form
Dim strSelect as String
:
Set gf_FormInstance = New Form_F_PerformanceSummary
:
gf_FormInstance.RecordSource = strSelect
gf_FormInstance.Refresh
gf_FormInstance.Visible = True

The problem is, the Set statement causes the New form instance to retrieve all records from the existing record source, slowing down the performance.

I'd like to find a trick to suppress the retrieval of records when the Set statement executes, and then allow them to retrieve when the Refresh statement executes.

Any suggestions would be much appreciated.

Thanks,
Keith.

View 2 Replies View Related

Forms :: Hide Controls When A Form Is Opened Conditionally

Oct 7, 2014

I've searched and can only find information setting the visible property when selections are made on an open form--I want to set the visible property when the form is opened depending on which avenue the user chooses from the navigation form.

I have a navigation form (Form A) and a second form with a subform (Form B). The user will choose from a combobox, either an existing record or a new record on Form A. On Form A there are two buttons, one that will take the user to the correct record on Form B for editing and one that will open to a new record on Form B. Once Form B is open, all controls will be blank (if a new record is chosen) or with certain controls prepopulated if an existing record is chosen.

What I want to do is to hide controls on the main form (not the subform) of Form B if the user chooses an existing record. Form A's buttons work correctly to open Form B right now. I want to be able to hide prepopulated controls on Form B if the user chooses an existing record from Form A.

Here's the code I'm using to open Form B to an existing record. I'd like to set the visible property here if at all possible.

NOTE: "Form A" and "Form B" are not the actual names of my forms--it's just easier for illustration purposes here in my question.

Private Sub cmdAddLogEntry_Click()
DoCmd.OpenForm "Form B", acNormal, , "Activity_ID = " & Me.cboINum
DoCmd.Close acForm, "Form A", acSaveYes

End Sub

View 4 Replies View Related

Suppress Messagebox

Dec 20, 2006

Hello all:

Code:

Dim rs as object
Set rs = Me!RecordSet.Clone
rs.Find first "[Student_ID]='" & Me![Combo134] & "'"
Me.Bokmark=rs.Bookmark

If Me! Major_CD = "F16" or "616" or "611"
msgbox "MUST COMPLETE SURVEY"
End if

End sub

A student ID number is entered into a combobox and it returns name, Major_CD(Major Code) and Degree type.
If the major code is "F16" or "616", a message is displayed.

How do I suppress this messagebox the the student has a different major code? In other words, there are students in the database with other major codes that are 111, 121, 363. I would like for the other major codes to NOT display a message box. Right now, it displays a messagebox for everyone.

Any ideas?

Many, many thanks

Dion

View 2 Replies View Related

Suppress Fields In Query

May 18, 2005

I have four fields in a Table. They are all four date fields. I want to do a query and see information in all four fields, but I only want to see the information if it is before a certain date.
So far I have tried this:

<Date().

This works but it shows all four fields even if it is after this date. How can I suppress the fields to appear blank if the date is not before today's date?

View 2 Replies View Related

Suppress Error On Report

Aug 24, 2006

I have a report that is linked to a query... lets say my query returns no records the report comes up with a whole bunch of #Errors on it. How do i prevent this from happening?

thanks

Green

View 1 Replies View Related

Suppress An Access Message??

Dec 27, 2004

i am receiving an access-generated message "Data has been changed".. All of the processing works correctly.. but i get this message. i receive this message on an edit form of mine.. this form has a continious subform.. fields are account and amount.. if i wipe out the first one (account/amount).. that is when i receive this message.. very annoying.. but only happens when i wipe out the FIRST one.. if i wipe out one in the middle or end.. then i get no message.. i searched microsoft, here, and googled it and came up with nothing.. anyone have any ideas?.. thanks!

View 6 Replies View Related

Suppress Labels & Fields

Jul 20, 2005

We use an Access database to review multiple banking regulations on a sample of loans each month. I have reports set up to show the findings of different requirements. Each field is populated with a "Yes" "No" "N/A" or is left blank depending on the loan characteristics.

My queries pull regulatory errors if any of the fields = "No" and the reports show all regulatory requirements for that loan. For example, if the loan has real estate as collateral and no flood determination was ran prior to loan closing, they would select "No" from the combobox and it populates the field. All questions dealing with the flood laws populate on the report.

[U]If I want to show ONLY the fields that say "No" with the corresponding label, how do I get all fields that say "Yes" "N/A" or are blank to disappear, the corresponding lable to disappear, and the data to "shrink up" so there is not a lot of blank space?

Thanks for all of your help!
Dradich

View 1 Replies View Related

Suppress/Hide Blank Row In A Subform

Jul 27, 2006

I need to suppress/hide a blank row on a subform.
The Main form is based on a table, contains Site Header information
The Subform is based on another table containing Sample Details records

Site Header table to Sample Details table relation ship is one-to-many,
with two key fields SiteID and SiteVisitDate

The Form/SubForm is linked by SiteID, SiteVisitDate

The form adds one record to the Site Header Table.
Then adds mutliple records to the Sample Details table for that SiteID.
Some fields are populated with a script, while others are populated by user input

An empty/blank/new row always appears on the subform before & after the Sample Details are added. The blank row Before new records are added is not a problem but when it appears after new records are added is a pain

I've tried CanShrink etc,

Any help appreciated

Cheers,
Michael

View 6 Replies View Related

How To Suppress The Confirmation Messages In Access?

Mar 7, 2007

When i try to insert data into a backend Oracle table (with ODBC) using a form, (i use docmd.runsql "insert....") Access gives me a message like"You are trying to append 1 row to the table are you sure you want to append?"

i want to suppress this message as i have to insert into 2 tables and delete from 3 tables when the user enters some data in the form, so it asks the user five times (say 2 times for insert and 3 times for delete..) when it inserts or deletes each table. the user doesnt want this to click every time when they do that...
how do i suppress these messages, is it Access-specific or oracle specific?
I am not able to do this..!
is this any kind of exception that i have to put in??

Thanks for all ur help!!

View 2 Replies View Related

Queries :: Suppress Printing Field

Sep 6, 2014

How does one suppress printing of a field when the field contains a value (i.e. a date).

View 2 Replies View Related

Modules & VBA :: How To Suppress Specific Warnings

Aug 18, 2014

I have a button on a form that appends data to a table. When I click the button, I get 2 warnings:

1) "You are about to append 1 row"

2) "Microsoft Access can't append all the record in the append query."

I know I can use docmd.setwarnings = false then set back to true, but I'm only interested in suppressing the 1st warning, and I want the user to see the second warning.

Is there any way to suppress the 1st warning and display the 2nd?

View 6 Replies View Related

Reports :: Suppress SubReport With No Data

Jul 25, 2015

I have a report that calls a subreport. In most instances, the subreport will have no data and I won't want to show the subreport. I've tried various ways to deal with this:

1) Make the subreport property on the main report the minimum height and set CanGrow = Yes
2) Use the Report_NoData event on the subreport and add the code 'Cancel = 1'
3) Make all the fields on the subreport the minimum height and set CanGrow = Yes

None of these seem to work. I don't have any headings on the subreport, so the only price I'm paying is adding a gap onto the main report the size of one detail line of the subreport. Still, it leaves the report lacking professional quality.

View 4 Replies View Related

Conditionally Numbered Sequence

Aug 29, 2006

Hi,

I have a table with 400,000 (approx) records in the following format:

a(PK:AutoNum) - b(text)-c(text)-d(Num)-e(text) - f (text - unique/random)
A B C D E F
1 - 6767 - P2 - 1 - 24/992 - 34341212
2 - 6767 - P2 - 1 - 24/993 - 87657483
3 - 6767 - P2 - 1 - 24/995 - 98764536
4 - 6767 - P2 - 2 - 24/996 - 87543297
5 - 6767 - P2 - 2 - 24/998 - 98674635
6 - 6767 - P2 - 2 - 24/999 - 34546576
7 - 6767 - P2 - 2 - 25/001 - 98768547
8 - 6767 - P2 - 2 - 25/002 - 46576897
9 - 6767 - P2 - 2 - 25/004 - 62536475

I need to create a new field in a query that acts like an autonumber, that resets based on an increase in field (d).

ie:

1 - 6767 - P2 - 1 - 24/992 - 34341212 - 1
2 - 6767 - P2 - 1 - 24/993 - 87657483 - 2
3 - 6767 - P2 - 1 - 24/995 - 98764536 - 3
4 - 6767 - P2 - 2 - 24/996 - 87543297 - 1
5 - 6767 - P2 - 2 - 24/998 - 98674635 - 2
6 - 6767 - P2 - 2 - 24/999 - 34546576 - 3
7 - 6767 - P2 - 2 - 25/001 - 98768547 - 4
8 - 6767 - P2 - 2 - 25/002 - 46576897 - 5
9 - 6767 - P2 - 2 - 25/004 - 62536475 - 6

I initially thought I could make an IIF expression that basically says: if [d] in this row is the same as [d] in the previous row then add 1 to the previous record [new number], otherwise, enter 1 in this record [new number] (thereby resetting it)....

I have searched the forums for 'numbered sequences' (amongst other things), and it appears that either the Dcount or Dmax function appear to be the solution, but I'm having some trouble applying it to this problem. I was hoping someone can help me through it.

Cheers

View 1 Replies View Related

Conditionally Setting The Value Of An Expression

Aug 30, 2006

I am trying to enter an experssion into the grid for age groups. The result will be a text value based on the value in a column named Age. There are three groups, '<18', '18-30', and '31+'. I tried using the following but the result that is returned is #Error.

age_grp: Switch([age]<18,'<18',[age]>=18 And [age]<31,'18 -30',[age]>30,'31+')

Do I have the syntax wrong? or maybe I'm going about it completely wrong.

I have also tried a nested iif statement Age2:= iif([age]<18,'<18', iif([age] >=18 And < 31, '18-30'), iif([age] >30, '31+')). I get the same error message.

This worked for displaying the value on a report =IIf([age]>=18 And [age]<=30,"18-30",'31+'). However, I need to sort and group by the value so I can count the number in each group, so I wanted to put it into a query.

Thanks,
Christy

View 4 Replies View Related

Conditionally Lock Record

Apr 11, 2005

OS/Program :xp/Access 2002

The following problem. Within my main form I have a status field. Dependent of the status of the main field I would like to lock the total record in my sub form at once. Within which event of the sub form could I achieve this and which property locks a total record?

thanks
giovi

View 2 Replies View Related

Conditionally Format Text Box

Oct 18, 2005

Hi All,

I have built a code database where right now I display my sample code in a textbox on my main form. I was hoping to replace the text box with a Rich Text Box. I could then format the code to sort of match what would be shown in the VB/VBA IDE.

I know the Rich Text Box was disabled in Access 2003 for security reasons. I also know that there is another free RTF control. I was hoping to find out how Microsoft intended for us to replace the Rich Text Box. I could use a Web Browser Control but I was not sure of the best way to add this to my form and then feed it the data that was originally bound to the text box.

Thanks for any insight you would be able to provide.
Steve

View 1 Replies View Related

Suppress Warnings When Saving Text File?

Oct 12, 2004

How can I suppress the warnings that Excel displays when saving the text file?

These are the messages displayed when saving the file as text:

"The file already exists. Do you want to replace the existing file?" RESPONSE: Yes

"myfile.xls may contain features not compatible with Text..." RESPONSE: Yes

These are the messages displayed when closing the file:

"Do you want to save the changes you made?" RESPONSE: Yes or No - can enter either as no further changes have been made

"The file already exists. Do you want to replace the existing file?" RESPONSE: Yes or No - can enter either as no further changes have been made

View 1 Replies View Related

Reports :: Suppress Fields Or Section By Criteria

Aug 29, 2014

I have a command button that opens a report with a where filter. The report has a main section and a detail section. Its a Organisation and its Contacts. The Contacts are in the detail section. How can I suppress the detail section (and a label) if there is no records to show in the detail section?

View 4 Replies View Related

Reports :: Suppress Data In A Field On A Report

Mar 4, 2013

I've got a report that is displaying addresses which are all identified as 'public' or 'private'. I want to be able to display the 'public addresses' and leave the 'private' addresses blank (but still show other fields.. phone no.s etc). The field that the data appears in is Address 1 (for both public or private), depending on what the data entry clerk has selected as the preferred address (ie public or private).I've been playing with the Iif function, but have not had any success...

Address Type: Private or Public
Address1: Address details

View 5 Replies View Related

Change Value Of Unbound TextBox Conditionally

Jan 10, 2006

Can anyone help me out here.
I need to use an unbound text control to return me a value if a field is populated else "Local" if the field is not populated.
Can anyone tell me if this is possible and show me the syntax if it is.
Help appreciated.
Andy

View 8 Replies View Related

Calculate A New Value Conditionally Based On 2 Records

May 1, 2006

I am trying to write an expression that calculates a new field in a query. The new field is simply recoding values from another field (survey question responses) using IIf statements. This new field, let's call it RecodedResponse, will eventually be summed in a totals query to get the total score on that survey for each participant. Each record is a question response and there are multiple records for each participant (16 items on this particular survey). The problem is that for 2 of the questions on this 16 item survey, the responses are supposed to be eventually combined and recoded based on each other. So, my question is:

Is there a way to do a conditional expression where the result from the previous record is used? Or do I need to first do a crosstab query so that all the responses for one participant are on one line?

I am pretty sure I can do a workaround to make it work, probably doing a crosstab, then recoding in another query based on the crosstab, but it would be cleaner (I think) to do this some other way. Any ideas? Or is this too vague?

Thanks,
Liz

View 3 Replies View Related

Conditionally Select Query Fields

May 10, 2007

Is there a way to select a query field based on conditions? There is a table at work that I need to use for my reporting in which the field names are the months of the year. Since my report is monthly for that specific month only, I have to change my field in the query every single month. I would like to be able to put in some type of code that will automatically select the proper month field.

Is this possible?

Thanks! :)

View 2 Replies View Related

Forms :: Conditionally Formatting A Drop-down Box

Apr 30, 2014

I work for a doctor, and I am creating a database to assist with surgery scheduling. There are a lot of pieces and parts to this process, and I am building a "bird's eye view" of tasks to be completed, such as "Notified OR," "Sent Surgery Packet," and "Scheduled Post-Op Appt." Each one of these fields has a lookup attached to it with three choices: "Yes," "No," and "Not Needed."

What I want is for the drop-down box with the three choices to be (a) automatically defaulted to "No," (b) immediately turn red if "No" is displayed or immediately turn green if "Yes" or "Not Needed" is displayed. In this way, the goal for our scheduler will be to get all the drop-downs to turn green (an easy visual cue that the patient is ready for surgery) by the date of the procedure.

View 1 Replies View Related

Suppress Numerical Values From Being Displayed On Yes / No Check Boxes

Nov 15, 2011

How do I suppress the numerical values from being displayed on the "yes/no" check boxes when a user clicks directly in the field, instead of clicking the arrowhead as they should?

View 3 Replies View Related

Queries :: How To Conditionally Update Multiple Columns

Mar 29, 2013

I have a databse of bird ringing (banding) which I have turned into an encouter history by using the pivot table capability in MS Access. Example attached.

For each animal, identified by a ring number in column B, there is a set of "encounters" over time. A blank in a date column indicates that the animal was not seen or captures in that year. A number in the column indicates that it was seen or captured n times.

To format these data correctly for subsequent surival probability analysis, I need to replace all of the blanks, in each of the "year" columns with a 0 and anything that isn't blank (e.g. 1, 2 or 3) with 1. So, I need columns F to L to look like C to D.

It was simple enough to do this one column at a time...

UPDATE [Capture history intermediate] SET [Capture history intermediate].[1971] = "0"

WHERE ((([Capture history intermediate].[1971]) Is Null))

But I have a lot of data, spanning 40 years (i.e. 40 columns) and I will probably have to do this conversion many times as I work on sub-sets of my master database.

So, question is, is there a short-cut way to avoid having to create 40 different queries and run each one seperately?

View 3 Replies View Related







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