Visible Data With If/Then

Jun 14, 2006

Hello,
I have a form with twa txtboxes named mytxt and txtresult.

The txtresult gets its data from a module (GetInterval).

I have written this statement:

If IsNull (Me.mytxt) then
Me.txtresult) = Null

I get an error as if that control cannot contain null values.

I have done the same with another sample, simply changing the record source of my txtresult to a field of my table and works?

can anyone see the problem?

I have also tried in with this code but still nothing:

If Len(Trim$(Me!USER & vbNullString)) = 0 Then

Thanks.

View Replies


ADVERTISEMENT

Forms :: Visible / Non-visible Combobox - Column Attribute?

Oct 17, 2013

I have a combobox on my form called TypeOfBusiness, with fields including Corporation, Education, Industry, Non-Profit. In order to make a second combobox called IndustryClassification appear when Industry is selected from the TypeOfBusiness combobox, I have used the following code:

Code:
Private Sub Form_Current()
If Me.TypeOfBusiness = "Industry" Then
Me.IndustryClassification.Visible = True
Else
Me.IndustryClassification.Visible = False

[Code] .....

It works just fine. However, when a user selects both, say, Industry and Education, the IndustryClassification combobox will not appear. What code I can use to ensure the IndustryClassification box will appear regardless if another box is checked in addition to Industry? I am wondering if it has to do with the Column attribute.

View 14 Replies View Related

Data Tables Not Visible

Mar 4, 2005

I am receiving the following error while trying "get external data from Access to Excel". The purpose is to set up a pivot table from my access data. The error is as follows:
"This data source contains no visible tables". Can anyone explain why I would recieve the error, when I have tables in my Access database?
Thanks,

todd

View 2 Replies View Related

Modules & VBA :: Make Controls Visible Or Not Visible?

Mar 24, 2015

I have a Main Form with a Sub-Form, the sub-form is base off a query. on the sub-form i have 8 controls, one of them is "Status' and "Process" and "Review" My Main Form have a Refresh command that refreshes the data in the sub-form.

What i am trying to do is make the "Process" Control only visible is "Status" is a certain status and "Review" visible if "Status" is something else. what i have done works correctly On Open. I run into and issue on the refresh command. I get Run-time error '2165' "You can't hide a control that has the focus"

Code:
If Forms!Main_Form.[Name subform]!Status = "Ready" Then
Forms!Main_Form.[Name subform]!Process.Visible = True
Forms!Main_Form.[Name subform]!Review.Visible = False
ElseIf Forms!Main_Form.[Name subform]!Status = "Reviewing" Then
Forms!Main_Form.[Name subform]!Review.Visible = True
Forms!Main_Form.[Name subform]!Process.Visible = False
End If

I have done similar with a main form and making sub-form visible or not based on a control on a main form and that has worked perfectly. I am not sure how the control is getting focus and cause the error.

View 4 Replies View Related

Field Data Not Visible / Hidden

Aug 22, 2014

I have 30 fields on a form that houses codes that are 1 to 2 digits in length. Some of those codes are used way more often than others so I decided to build a VBA script to apply the most common codes to the fields based on entry in 3 other fields and applied to a button. The code works great but one of the fields (the 6th one) is behaving oddly. I have tried multiple criteria for code and it is ONLY the 6th field being the pain. The code is applied to the field but it is invisible until that field gains focus by either clicking on it or tabbing to it. I checked the fields format to others of the 30 and all of the settings are exactly the same. There is not anything set in any of the events and there is not any other code pointing at those fields.

View 3 Replies View Related

Data No Longer Visible In Tables

Apr 30, 2013

I am using an application that uses an Access database, and I believe the original database was created in the 97 version. The application queries the database and allows a person to view the data in the database to select a particular instrument to test. When the MS Office was upgraded by our IT we are no longer able to view the data in application. The fields, rows, and columns appear, but the numbers and letters are not visible. The data is really there, but can't be seen.

I have attached a screenshot of the view that shows the white columns and rows.

View 4 Replies View Related

Making Data Visible Or Invisible In A Form?

Feb 16, 2007

My question is how can I make data in a form visible or invisible just by a button. In other words, if I have a group of buttons, based on the button selected I would want certain data to appear.

I know that this is possible, I have seen it done but just cannot find out how to do it or what this is called to look it up in Helps.

Thanks,
****

View 5 Replies View Related

General :: How To Keep Sub Report Visible Even If No Data Is Displayed

Jul 22, 2013

I have a report with 4 subreports. The report contains calculated fields that use the totals field in the different sub reports.

My issue is when one or more of the subreports does not have data in it. The sub report dissapears while in print preview, removing the totals row and ruining the calculated fields in the main report.

How can I keep the sub report visible even if no data is displayed? Or have it invisible but have the calculated fields still reference.

View 5 Replies View Related

Enter And Print Various Types Of Data - Navigation Pane Not Visible

Jul 14, 2014

I've inherited an Access 2000 database that is used to enter and print various types of data. I am using Access 2010 and when I open it I am in a forms view for the main user interface. I want to see and/or edit the objects that make up this database but I can't find a way to see them. The navigation pane is not visible and using F11 doesn't open it. How can I see the database objects?

View 14 Replies View Related

Visible.Enabled Remaining Visible!

Sep 12, 2004

I have a form with four subforms set up in a tabs on the form. In the subforms I have a copuple of command buttons which enable/make visible fields when they are clicked (see previous posts but for eg) - if a height and a weight are added in two separate boxes a calculation is done and then a command button pressed to make visible the (label) which shows the mass index the patient falls into. My problem is that the label is then retained so if I click out of the form and re-enter with a new patient then the height and weight boxes are clear but the label from the previous patient remains.

I tried to put the code
Private Sub Form_Load()
If PtWeight = Null And PtHeight = Null And Text60 = Null Then
Label106.Visible = False
Label101.Visible = False
Label177.Visible = False
Label122.Visible = False
Label123.Visible = False
End If
End Sub
in both the open and on load event of the main form (not the subform) but it doesn't help. Any ideas?

(When should code be put on the main form and when on the subform?)

View 2 Replies View Related

Tables :: Access 2007 / Data Not Visible In Table Datasheet View?

Dec 10, 2012

I have recently been modifying an existing Access 2007 database, everything seems to be working correctly, except that the main table holding most of the data is acting strangely.

If opened in database view, it is completely blank - no column headers, no data. Record count is correct and I can step through/select records, but there's just nothing visible at all.

The data clearly still exists as it can still be viewed in forms / queries / reports.

Only thing I can think of is that I have deleted a bunch of outdated queries & reports and it's possible that one or more of them may be cross-referenced with the table in another query, but still can't see why that should be causing this problem.

View 2 Replies View Related

Visible

Dec 2, 2005

Hi,
On the form,

I have one field called "Tax", when I open the form, the "Tax" is invisible, when I click one button, then the "Tax" is visible, after the input the value, I want the "Tax" to be invisible. But it cannot be invisible.

Private Sub Tax AfterUpdate()
[Tax].Visible = False
End Sub

How can I fix it? Thanks.

View 7 Replies View Related

Visible

Sep 7, 2005

This might sound simple to everyone, but it won't work for me. I have a text box on my form that holds the current date, there are also other text boxes that hold other information. Here's what I'm trying to do, if the other text boxes are empty then I want the date text box to be invisible. Here's the code I'm trying to use:

Code:If [EquipmentType1]=" " Then[DateSigned].visible = FalseEnd IfEnd Sub

By the way this is triggered from the Form Load event. Thanks for any help you can provide.

Scott

View 3 Replies View Related

Form Always Visible?

Apr 29, 2005

I created a little form containing informations the users need to see to insert the right values in other forms. I need to have this little form always visible even if the users are working with another form maximized.
Does it exist a code to do it?

View 4 Replies View Related

Set Visible By Keyword

Aug 16, 2005

In my form, I have a combo box with one of three options (cash, check, reimbursement). If the user chooses check, I want a text box to become visible, so the user may input the check number.

I thought I could use another invisible text box to store the value of the combo box and then in the code put:

Private Sub Text64_AfterUpdate()
If Text64 = "Check" Then
Me.Check1.Visible = True
Else
Me.Check1.Visible = Refresh
End If
Me.Refresh
End Sub

Text64 is holding the value of the combo box
Check1 is the text box where I want the user to put the check number.

Please help. Thanks

View 14 Replies View Related

Button Visible

Aug 25, 2005

Hi could someone help me with the following please:

when a click on 'Button A' i want Button B, Button C and Button D (not yet visible) to appear. Then when i click on Button A again i want them to dissappear. Im sure this is easy!

Thanks

View 11 Replies View Related

Visible Text

Feb 26, 2006

Hello. In my table there is a checkbox column. This box is checked on a form which feeds the table. I run reports from queries which contain both checked results as well as unchecked results. Is it possible for on the report, for the text (the field name, not the checkbox) to only appear when the box is checked? I hope I'm explaining this properly. I want the checkbox title to only appear on the report when the box is checked, otherwise I don't want it visible.

Thanks for your help.

View 6 Replies View Related

Visible And Null

Mar 30, 2006

Simple but confusing.

I have a form with several controls. NAME, DOB and AGE.

NAME and DOB have a source to a table while AGE is unbound.

I would like a code that when opening the form, will show the age only if the DOB contains data.

Basically something like this:

If IsNull (Me!DOB) Then
Me.AGE = Null

Else

If Not Is Null (Me!DOB) Then
Me!Age.forecolor = VBWhite 'this hides the data)

End If
End If

Any help what I am doing wrong?

Thanks.

View 1 Replies View Related

How To Make Tables Visible

Apr 6, 2007

hey guys i was just wondering if anyone knew the code to make a table visible via changing a combo box. i know for a form its simply
Form_formname.visible=True

View 2 Replies View Related

Make A Button Visible??!!

Feb 21, 2005

Hi,

What is the code for the following problem that am I having:

When I click on a button (button1) then I want to make another button (button2) visible.

Thanks for your help in advance!!

Paul.

View 5 Replies View Related

Yes/no = Button Visible/invisible?

Feb 26, 2005

I have tried searching a few threads, but can't get the answer or perhaps i'm tired. Anyway I have a YES/NO field and a command button. I want the button to be visible only if the yes field has been selected. No = invisible button.

Thanx

View 2 Replies View Related

Make Tabctl Visible

May 29, 2005

i am trying to make my tab control visible, after i did it visible=false in the open form event.
the problem is that the button that supposed to open the tab control is locates in a form and the tab control is located as a sub form.
it doesnt recognize any version of writing that i am trying.

details:
main form - "f_1"
sub form - "f_2"
the btn - btn1 (located in the main form)
the tabctl - tblctrl1 (located in the sub form)

please advice

View 1 Replies View Related

Subform Visible Property

Aug 5, 2005

I have a form with a subform on it, if the user clicks a control on the subform I want to set the subforms visible property to = False.

I have tried Me!Subform.visible=False and Form!Subform.Visible=False but neither are working, I think i have to set focus back to the main form before I can set the visible property of the subform.

View 2 Replies View Related

Making Text Visible

Aug 18, 2005

got 2 radiobuttons and i want the text further down the page to show or not show depending on the value on the radio buttons.

I have tryed making an IF, but it doesnt want to update when i change post, or when i start the form, the radio button get the correct button according to the table but the text wont show any way untill i reclick the radiobutton.
dont know if u got what i ment but if u didnt ill try to explain it more.

View 8 Replies View Related

Can't Make Form Visible, Again

Sep 20, 2005

Greetings. I have three forms that are open at the same time. They are related and cascading. The first form (frmEventAdd) is the anchor. Each event can have many Trials. The second form is frmTrialInfo. Each Trial can have three Classes. The third form is frmClassInfo. These forms are used for update and adding new records.

The user displays an event for update (frmEventAdd). Then clicks on a button to display the Trials for that event (opens frmTrialInfo). frmTrialInfo displays information for one Trial at a time. The user clicks on a button to display class information for that trial (frmClassInfo).

One of the fields on frmClassInfo is called cboJudge. It's a combobox with names of Judges (judges of dog competitions). The judge information in the combobox comes from two tables: tblPeople and tblJudges. If the user wants to add a new judge they may click on the btnNewJudge. btnNewJudge will open a form that is used to add a new person (frmPeople).

Because frmPeople is opened from many different points in the application, I found it easier to simply make the three, already opened, forms INVISIBLE.
So...command button btnNewJudge opens frmPeople and makes frmEventAdd, frmTrialInfo, and frmClassInfo INVISIBLE.

When frmPeople is closed (btnClose), it checks to see if each of the previously opened/visible windows is open and then makes each VISIBLE, again. frmEventAdd and frmTrialInfo reappear just fine. However frmClassInfo does not.

I have traced the btnClose_Click routine in frmPeople and it certainly looks like every line of code is being hit, but the line that should make frmClassInfo visible does not do anything (nor does it generate any error).

Here is the code from btnClose_Click in frmPeople. Can you help me?

********************************************

Private Sub btnClose_Click()
On Error GoTo Err_btnClose_Click

Dim blnEventAdd_Open As Boolean
Dim blnTrialInfo_Open As Boolean
Dim blnClassInfo_Open As Boolean

blnSecondChance = False

If blnDataChanged = True Then
If DataHasChanged() = vbYes Then
Call btnSave_Click
End If
End If

'================================================= =======================================
'blnSecondChance=False = NO SECOND CHANCE ... Close this Form
'blnSecondChance=True = USER GETS A SECOND CHANCE ... Do NOT Close this Form
'================================================= =======================================
If blnSecondChance = False Then
'Zero out Relative Record Number from Array
svRecNo(intCallerIX) = 0
blnDoUpdate = False
blnDataChanged = False
DoCmd.Close acForm, Me.Name

'Is the frmEventAdd form open?
blnEventAdd_Open = SysCmd(acSysCmdGetObjectState, acForm, "frmEventAdd") And _
acObjStateOpen

'Is the frmTrialInfo form open?
blnTrialInfo_Open = SysCmd(acSysCmdGetObjectState, acForm, "frmTrialInfo") And _
acObjStateOpen

'Is the frmClassInfo form open?
blnClassInfo_Open = SysCmd(acSysCmdGetObjectState, acForm, "frmClassInfo") And _
acObjStateOpen

If blnEventAdd_Open Or blnTrialInfo_Open Or blnClassInfo_Open Then
If blnEventAdd_Open Then
Forms("frmEventAdd").Visible = True
Forms("frmEventAdd")!cboContact.Requery
Forms("frmEventAdd")!cboSecretary.Requery
End If

If blnTrialInfo_Open Then
Forms("frmTrialInfo").Visible = True
Forms("frmTrialInfo")!cboTrialRep.Requery
End If

If blnClassInfo_Open Then
Forms("frmClassInfo").Visible = True
Forms("frmClassInfo")!cboJudge.Requery
End If

intCallerIX = intCallerIX - 1
Else
DoCmd.OpenForm PopCaller(), acNormal
End If
End If

Exit_btnClose_Click:
Exit Sub

Err_btnClose_Click:
Call ShowError("frmPeople", "btnClose_Click", Err.Number, Err.Description)
Resume Exit_btnClose_Click

End Sub

******************************************
Regards,
SueB

View 3 Replies View Related

Control Button Not Visible

Sep 21, 2005

Help - I have created a control button in a form using the wizard and in design view it is at the top underneath all the headings (in the form header) but when I go to normal view it is not there. I have checked the properties and it is down as visible yes display always and transparent no. I am now stumped as to why it's not there - any help appreciated!! :)

View 14 Replies View Related







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