Subform Controls Are Invisible

Jul 13, 2006

I have a subform (in form view) in a form that is used for data entry. When I open the form the subform is blank except for the navigation controls. The navigation controls are disabled though. If I switch to datasheet view I will see the column headers but there won't be any place to type data (no white boxes). This doesn't happen if my master and child fields aren't set up, but obviously that will show the wrong data and create other kinds of entry problems. Right now the tables are empty so that could be part of the problem, but I shouldn't have to manually enter a record so my form will look right.

View Replies


ADVERTISEMENT

Form's Controls 'invisible'

Nov 8, 2006

I have few forms that look fine when in Design view, but which appear as plain grey screens when opened in Form view. These were working perfectly (i.e. visible in both views) until about half an hour ago.

The only things I have changed are some of the calculations behind certain fields.

Any thoughts?

View 8 Replies View Related

Forms :: Header Controls Invisible On Split Form

Oct 30, 2013

I've placed an unbound text control in the header of a Split Form. I also placed a label in header of a split form.But, neither is visible until I select a row on the split form datasheet.The Visible property is set to yes and the fore color is white and the background is transparent.

View 6 Replies View Related

Invisible Subform?

Jun 30, 2005

I have a form which I use for call logging. I have created a subform which, when a client reference number is selected from a combo box in the main form, the client details appear (address, telephone number blah). It works fine but for purely aesthetic reasons, I want to make this subform invisible and create text fields in the main form bound to the text fields in the subform.

This I know how to do...

...making the subform invisible I do not!

The reason I want to do this is because I can't get the subform to look "nice" on the main form...with bound text fields on the main form I would be able to line them up nicely with existing text fields...

Hope someone can help or at least suggest a better alternative!

Steve

View 2 Replies View Related

ARGH !! Need Help On Visible/Invisible Subform

May 11, 2006

I am trying to make a subform appear when a particular entry is selected from a list box. I did a test... no problem. In my real database... well, you know. Here's my code:

----

On my main form property:

Private Sub Form_Open(Cancel As Integer)

DoCmd.Maximize
DoCmd.GoToRecord , , acNewRec

If Me![ProjectSubType] = "Commercial Chest" Then
Me![CommercialChestsSubForm].Visible = True
Else
Me![CommercialChestsSubForm].Visible = False
End If

End Sub

----
On my list box property:

Private Sub ProjectSubType_AfterUpdate()

If Me![ProjectSubType] = "Commercial Chest" Then
Me![CommercialChestsSubForm].Visible = True
Else
Me![CommercialChestsSubForm].Visible = False
End If

End Sub

----


Any help is GREATLY APPRECIATED.

Tom

View 2 Replies View Related

Forms :: Subform Visible / Invisible Based On Control

Jun 18, 2015

I need to have a subform that shows up smack dab in the middle of my main screen when visible - which is what I want - but only based on a specific value of a control on the main form. Specifically, if a control's value is "See Spreadsheet", I want the subform visible front and center as it contains the link to the server location for that specific record. If the control's value is not "See Spreadsheet", I want the form to be invisible.

My code:

If Me.BudgetsFacultyAccountNumber = "SEE SPREADSHEET" Then
Me.frmMsgBoxUpdateSpreadsheet.Form.Visible = True
Me.BudgetsFacultyServerLocation.Visible = True
Else:
Me.frmMsgBoxUpdateSpreadsheet.Form.Visible = False
Me.BudgetsFacultyServerLocation.Visible = False
End If

The red lines result in an MS VBA error: "Compile error: Method or data member not found."

I've tried referencing that subform a hundred different ways, but I can't get it to work.

View 5 Replies View Related

Forms :: Option Button Link To Invisible Subform?

May 8, 2014

I have two option buttons, 1_optn and 2_optn. I have two subforms, 1_frm and 2_frm.

When clicking the little round dot (the option button) for 1_optn, I want the subform 1_frm to become visible. Likewise, when clicking 2_optn, I want the subform 2_frm to become visible. In the properties panel, both forms visibility is set to No.

I have tried creating a Macro and the best I've gotten is using the OpenForm function but that opens up the forms in a new window. I'd set the Macro to the OnClick event for a combo box (as I couldn't get the option button to work) so when "1" is clicked, the form would pop up. But they have to be in the same form. No pop ups. It also has to be an option button, not a combo box or list box.It also has to be a Macro. No Event Procedure coding unfortunately.

View 1 Replies View Related

Modules & VBA :: Loop For Labels Invisible / Not Invisible

Nov 8, 2013

I'm trying to get some labels and eventually text boxes to become visible on an input of a qty in a text box, but I can't get my syntax right.Here's what I have so far.

Private Sub More_qty_AfterUpdate()
Dim count As Integer
Dim pumplbl As String
For count = 1 To [More qty].Value
pumplbl = "pumplbl" & count
pumplbl.Visible = True

Next count

End Sub

View 3 Replies View Related

Forms :: Make Column Invisible In Subform When Main Form Loads?

Sep 22, 2013

How do I make a column invisible in my subform when the main form loads?

View 3 Replies View Related

Forms :: Referencing A Subform Controls From Another Subform

Apr 15, 2014

I have a form with four unlinked sub forms on - I am hoping to

1) add a value from one subform to another and more importantly

2) update 1 subform when the other is amended...how exactly do I reference subform 2 from subform1.

I have tried me.parent!form2 and forms!mainform!form2.requery etc but can't get it right

View 7 Replies View Related

Referencing The Controls On A Subform...

Feb 16, 2007

Hello,

I need some help with a piece of code for a db.

This code checks to see if the last three characters on a ControlSource.Tag property are "Req" and if they are, tests if it's null or = 0 and if it is then it outputs a msg box stating that the control.ControlSource is required. It does it for every control on the main form.

This has worked.

Now, i need to allow for multiple subforms to be located on the main form along with their controls being tested as well. I want to start another loop for each time the conrol on the mainform is a subform.

I have that done so far by using "If TypeOf ctl Is SubForm Then..."

This is the part i need help with. I want to search all of the controls on the subform when it is a subform. I need to search all of the controls on the subform then, and i'm not quite sure of the syntax.

I've tried various somethings like SUBFORMCONTROL.Controls but that hasn't seemed to work...

If someone could help me, that would be wonderful!

View 4 Replies View Related

Subform Controls Not Allowed?!?!?!?!

Jan 24, 2005

Hello,
my problem looks so stupid, but I'm not able to solve it..
I've a form with two subforms in it and one of them is behaving in a strange way.
I open the form and type something in a text box in the form. Now I can type something else in a text box in the first subform but I'm not able to write anything in a textbox in subform n°2. It's textboxes (and also other controls like combo,...) look like they are not enabled (but they are enabled!!).
This subform has also got a Button, and it works (It deletes current record).

If I close the form and reopen it and I go straight to subform n°2, now I'm able to insert text in it's controls, but I'm not able to edit the controls in the main form and in subform n°1.

I hope my problem is clear
Please help!!

View 1 Replies View Related

Controls On Subform Disappear

Mar 31, 2005

Well this is going to take a bit of explaining, because my colleagues and I are totally baffled.

I have an Access 2000 front end connected to a Sql production server. I went to make some changes to my forms and subforms, but I did not want to do it with the live data. So I made a copy of the database to my own Sql server on my desktop. So far so good . . . Now when I opened my main form, my subform appeared, but its controls were invisible--I still had not touched the code.

I looked at all the properties for my form and subforms and it is set to Visible and Display always. Now, even stranger, when I advanced my records, if the subform had data its controls would become visible, and then disappear again when I reached a record that had no data for the subform (the main form and the subform are bound to two seperate tables within my database, all the subform controls are bound as are the majority of the form's controls).

Then I went to the code. Nowhere do I change the Visible related properties within the form/subform code. I decided to put a Stop in the Form_Current code of the subform and see what happens as I advance from record to record. What happened was that when I reached a record with subform data present the stop would be read and I would toggle through the Form_Current code. When I would reach a record with no subform data, the Form_Current code would not be read as evidenced by there being no Stop action.

Anyone have an idea of what's going on? Something gets changed when I connect to my local SQL server. Even when I reconnect to the production server the problem remains. Its like some property changes, although I cannot find it, and it is changed permanently. The only property I play with by code is that I enable the controls of the subform when there is NO data in the subform, and I disable the controls when there is data. This code follows:


Private Sub Form_Current()
On Error GoTo Err_Form_Current

If Me!AssignedNumber = True Then
Me!AssignedNumber.Enabled = False
Me!txtWTNumber.Locked = True
Else
Me!AssignedNumber.Enabled = True
Me!txtWTNumber.Locked = False
End If

Exit_Form_Current:
Exit Sub

Err_Form_Current:
MsgBox Err.Description
Resume Exit_Form_Current


End Sub


Finally I tried to set Visible to true within my code for the individual controls, but that still did not overide the problem. I connect to my server via an ODBC connection to a .dsn.

Thanks in advance for bearing with me,
Tony

View 1 Replies View Related

Access A Controls Value In One SubForm From Another

Jan 26, 2005

Hi,

I have two subForms on separate pages of a Tab Control on a main form. I want to create a Textbox on one Form to display the month of a Date field on another form, using DatePart.

Using the On Current event, this works ok, if I have the 'other' subForm open in its own right, but I get message telling me it can't be found if i don't. Here is what I have...

Private Sub Form_Current()
If Not IsNull(Forms![Reviews]!SelectLessee) Then
Dim revDate As Date
revDate = Forms![subReviewPEST]!DateOfNextCreditReview
Me.Text118.Value = DatePart("m", revDate)
End If
End Sub

What syntax do I need, or how then can I access the control without having the subForm open itself, by getting to the page on the tab control, then to the control on the subform...

View 2 Replies View Related

Tab Controls On Subform For Sequential Records

May 19, 2006

I have a form with 3 tabs...each tab has the same subform embedded in it.

There are 3 sequential records in the database, and my desire is to have each record display on its' proper tab.

How can I set filter criteria for each subform to append the record sequence identifier to the link master/child fields to ensure that only the appropriate record displays on each tab?

Basically, I trying to use tab controls with embedded subforms to display the many side of a one to many relationship. The parent form contains the data for the parentrecord, and I want the subform, with a tab for each related record, to show the child side of the data relationship. One child record per tab, utilizing the same identical sub-form for each.

View 1 Replies View Related

Forms :: Looping Through Subform Controls?

Aug 16, 2013

I have a main form, lets call it FrmMain. In addition, I have a subform on FrmMain that has a tab control on it (frmSubform). What I would like to do is on form load, reference the tab control that is on the subform, loop through the controls/textboxes, lock them and change their backcolor. The code I am attempting is listed below, however, I am getting a "type mismatch error" highlighting this line:

PHP Code:

Set Frm = Forms!frmConsultingMain!FrmConsultingFeeData 

Below is my code:

PHP Code:

Dim ctl As ControlDim Frm As FormSet Frm = Forms!frmmain!FrmSubformFor Each ctl In Frm.Controls    
If (TypeName(ctl) = "Textbox" Or (TypeName(ctl) = "combobox") Or (TypeName(ctl) = "listbox")) Then        
ctl.Value = Null        ctl.BackColor = vbYellow        ctl.Locked = True    End IfNext ctl 

View 10 Replies View Related

Forms :: 2 Lookup Controls On One Subform

Aug 13, 2013

I have a library database with a form called Author and a subform from a junction table. The junction table connects Title/Genre. It's many to many because I usually have a few genres for one book.

This is my problem. I want to add more information to the subtable that is in the junction table. For every record I would like to add also Book Group (I am a member of several groups and want to remember which one I read the book with) and Purchased From.

So I am assuming I have to have 2 lookup controls to be able to add Book Group and Purchased from since neither one is on the junction table (and they both come from tables). Or do I add them to the junction table?

View 3 Replies View Related

Lining Up Controls On Main Form And Subform

Oct 1, 2015

I have some controls that I want to line up. Some are on the main form and some are on a subform. My questions is how do I do it? I normally

Select all of the controls then click on align and align top and left. Will that work here?

Again some controls on main and rest on subform.

View 3 Replies View Related

Modules & VBA :: Delete Records From A Table Using Controls On A Subform

Jun 20, 2013

I have a sub form that allows users to add staff to a project team, once added it populates a table which updates the subform showing the selected employee. I am trying to enable a delete function that allows users to remove an employee from the project team in the subform showing selected staff. Here is the code I have so far, but it doesn't work;

Code:
Private Sub Command4_Click()
Dim dbs As Database
Dim rs As Recordset
Dim sqlstr As String
Set dbs = CurrentDb
sqlstr = "DELETE tbl_CapexStaff.* FROM tbl_CapexStaff WHERE CAP_ID = Forms!frm_Switchboard.CAP_Live"
dbs.Execute (sqlstr)
End Sub

View 4 Replies View Related

Forms :: Conditional Formatting Of Controls In A Continuous Subform (Access2007)

Aug 28, 2013

I have a continuous subform with multiple controls (textboxes) per row.

I'm trying to set up conditional formatting such that certain textboxes are highlighted based on comparisons with other textboxes within the same row/record.

What's bothering me is, I have managed it for one, but struggling to do it for others!

For example - I want to highlight 'similar' records (i.e. possible duplications) - and have managed this by adding a textbox across the length of the row and applying the following CF expression :

Quote:

DCount("[ID]","[tblMyTable]","[ID] <> " & "txtID" & " And [Field1]=" & "txtField1" & " And [Field2]=" & "txtField2" & " And [Field3]=" & "txtField3" & " And [Field4]=" & "txtField4" & " And [Field5]=" & "txtField5")>0

Works brilliantly - highlights all records where fields 1 thru 5 hold common values.

Now I want to highlight where two fields within the same record are different (i.e. they are driven by different data but should hold the same value)

Am trying this :

Quote:

"txtField3"<>"txtField4"

But it's not working - it's highlighting pairs of fields even though they do hold the same value.

Even tried switching it for a DLookup (which seems like doubling up on effort, but just to see if it worked)

Quote:

DLookUp("[Field3]","[tblMyTable]","[ID]=" & "txtID")<>DLookUp("[Field4]","[tblMyTable]","[ID]=" & "txtID")

But no dice? I can't figure out why the same basic logic which works so well for the first CF, doesn't hold for the second one.

View 5 Replies View Related

Modules & VBA :: Reference Field On Datasheet - Unbound Subform Controls

Jun 2, 2014

I have placed an unbound subform on a form. I have the following code which loads in different datasheet to the subform:

'Loads in NewQuery
Me.data.SourceObject = "query.NewQuery"

'Loads in NewQuery2
Me.data.SourceObject = "query.NewQuery2"

etc.... this works fine to show these queries but i want to know how to reference the fields on the datasheet.

for example one of the fields in NewQuery is "ID"... When clicked i want to run code... normally on bound subform i could go for example ID_Click()... msgbox(me.ID)

how can i reference these other fields on unbound???

View 3 Replies View Related

Modules & VBA :: Hide Subform Footer Controls If No Records Present (AC2007)

Mar 14, 2014

I have a subform which lists a set of records. In the footer section of the subform, I have a number of controls which display calculations based on the records present.

The number of records in the subform will change (reduce). Basically, this is a review / approval function, the idea being that each record will be checked and approved, which will then remove it from the list.

So eventually, all of the records in the subform should disappear (the subform is requeried each time the user approves a record)

I want to be able to hide the controls in the footer section once the subform has been cleared of all records.

But not sure

a) how to determine when the subform's recordset reaches zero and

b) what event to use to fire the code to hide the footer controls.

This is my basic attempt :

Code:
Private Sub Form_Current()Dim ctl As Control
For Each ctl In Me.FormFooter.Controls
ctl.Visible = Not (Me.Recordset.EOF)
Next ctl
End Sub

But it doesn't work (it only seems to fire when the subform is loaded, not when it is requeried after each approval?)

I've tried Form_Query, Form_DataChange and Form_DataSetChange but no joy with those either.

View 6 Replies View Related

Forms :: Locking Main Form Controls Causes Data In Subform To Disappear?

Dec 12, 2014

So I am creating a Complaint Tracking Database with Access 2013. In my 'complaint entry form' I have added to ability to "Open" and "Close" the complaint. While the complaint is open the user is able to enter/edit data in the complaint (new or old). When the complaint is "Closed" (done so with a button on the form that prompts the user to enter a date of their choice) the user should not be able to enter/edit data in the given complaint. In my original thinking, I placed checks on various events (on load, after update, on click) that checked to see if the current complaint had a date in the "Close date" field.

If the close date field was null then that meant that the complaint was open and the the controls would NOT be locked. If the close date field was NOT null (i.e. a date was present) then the complaint was closed and the main form fields were locked but the data was still viewable and unless they "re-opened" the complaint they could not change the data.

Now, in the complaint entry form, I have a subform that acts as a action tracker that is used by the user to keep track of the actions taken on the complaint (i.e. they requested documentation from such and such on this date..etc). My problem through all of this is upon closing the complaint and locking the main form controls, my subforms data just vanishes! At first I figured the problem might be with the linking of master and child fields, so I made sure that I left the ID in the main form unlocked when I loop through my controls during the locking process. This did not solve my problem. Code below:

Private Sub Form_Load()
Dim ctl As Control
If Not IsNull(Me.close_date) Then
Me.FormHeader.Visible = True
Me.btnClosed.Enabled = False
Me.btnOpen.Enabled = True
For Each ctl In Me.Controls

[Code] .....

View 3 Replies View Related

Subform In A Form Doesn Show Controls When Link Child And Master Fields Derfined

Jun 13, 2005

Hello,

I have a form and a subform in MS Access 2003. I have made some changes to database structure, so I decided to change the subform also. When I changed the Link child and link master fields, the controls of the subdatasheet dissapear- they show only in design view. If I clear the contents of Link child and link master fields they appear again, but the records are not binded.
Is there a setting on the parent form that also has to be changed, to make the new binding?

Thanks,
Aleksander

View 1 Replies View Related

Tab Invisible

Jan 25, 2006

I want to invisible some subform in tab, and there have some check box in the main form to controls which form is visible.
----------------------------------------------------------------------
Private Sub StudentInfo_Click()

If Not IsNull(Me.StudentInfo) Then
Me.tabStudentInfo.visible = "Yes"
Else Me.tabStudentInfo.visible = "No"
End If

End Sub
----------------------------------------------------------------------
Did my code have anything wrong?

Thank

View 3 Replies View Related

Invisible

Dec 21, 2004

Hi all

on a report, I'd like some sections to dissappear (a bunch of labels, text boxes etc...) if there isn't any data.

I have a text box with a fomula in it to return values. But if the value is null, nothing displays. This bit is OK. But I'd like the associated lable to dissappear as well. This is one of the many combinatios I've tried:
Private Sub Report_Open(Cancel As Integer)

If txtboxpmpbalance.ControlSource = Null Then
lblpmpbalance.Visible = False


End If
End Sub

I get a run time error saying there's no value. I'm assuming its because there's a formula rather than a value in the control. I appreciate any ideas.

Damon

View 3 Replies View Related







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