Topics Search

Access 2003: List of "TAG" property of all label controls

Access 2003: List of "TAG" property of all label controls
Views: 9
I have a DB created with Access 2003 on XP Pro SP3.
I would like to check the "TAG" property on all Label controls.
I can do it without problems if the forms are opened, but I haven't found yet a solution when the forms are closed.
I have found the below example on Access Help where it uses AllForms expression.
Unfortunately it returns only the form's name and it seems that there is no way to use the object AccessObject to manage the controls inside the form.

Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
' Search for open AccessObject objects in AllForms collection.
For Each obj In dbs.AllForms
If obj.IsLoaded = True Then
' Print name of obj.
Debug.Print obj.Name
End If
Sponsored Links:

Similar posts...

 

Access 2003: How to have a Sequence Number Label Report print

Access 2003: How to have a Sequence Number Label Report print Icon
Using Access 2003:
I have a form with:
Label starts at: ncount
Label sequence: nSequence
Number of Labels to print: nPagePrint
& other fields

When form Button form_Print_Button is selected
- the table (ncount,nSequence) is updated
- DoCmd.OpenReport "rptBarcodeFinishProductLabel", acViewPreview
- DoCmd.PrintOut acPages, 1, 1, , Me.nPagePrint

Everything Works Ok.
The only problem is I want each label to print
sequential number starting at: ncount
Label 1: . Box Number: 1 (assuming ncount=1 and nsequence=1)
Label 2: . Box Number: 2
Label 3: . Box Number: 3
Label 4: . Box Number
 

A2007 Some Combo Boxes changing back color on their own as they loose focus?

A2007 Some Combo Boxes changing back color on their own as they loose focus? Icon
Access 2007 as really done it this time. On one form I have five Combo Box controls. I have been working most of the afternoon on UI formatting. Now 2 to 3 of the 5 controls SOMETIMES change their background color from white (asit should be) to the grey that is the form's background color.

Of the controls that do this, at least one SOMETIMES decides to stay white for some list values and only do the grey change color for some values.

Other controls consistently shift to grey when they loose focus.

Thus far, I was only able to find one page mentioning this on the Internet: "2007 Access Combo Box changes Background color after tab through f" [LINK]

I do not see the Alternate Color property on my A2007 Combo Box controls. I do see the property for the "Detail" portion of the Form the Control is placed on. I have already tried my Decompile / Compact / Compile process, and that did not correct the misbehavior.
 

Modifying Label Caption in VBA Code from Form?

Modifying Label Caption in VBA Code from Form? Icon
I have a form that opens a report, and before I open that report I'm trying to change the caption of a label on the report. I'm having troubles accomplishing this. The label is named lblFilter, I've tried.

Report_MyReport.Controls("lblFilter").Caption = txtDate.value
-----
Report_MyReport.lblFilter.Caption = txtDate.value

And, it just not working. I'm not sure how to reference that label's caption property properly.
 

Invisible Controls In Form View/DE "No" Prop Issue

Invisible Controls In Form View/DE "No" Prop Issue Icon
Yet again, buggy, frustrating, confounding Microsoft has managed to make a horrifyingly simple task inspire me to throw my PC out the window and shortly follow it. Consider this new gem:

I'm not getting existing table records showing up in Form View.

a) There's records in the table.
b) The form's Record Source currently contains one-to-one textbox controls from one table. The only control not sourced to that table is not currently sourced to ANYTHING.
c) The Form "Data Entry" property is set to "No"; the "Recordset Type" is "Dynaset (Inconsistent Updates)".for flexibility; the "Allow Additions" property is set to "Yes".
d) The Form Detail "Visible" property is set to "Yes".

Given those, why in the world would I not be seeing the 14 records in the source table, especially with the "Data Entry" property set to "No"?!
 

New Version of Invisible Controls In Form View/DE "No" Prop Issue

New Version of Invisible Controls In Form View/DE "No" Prop Issue Icon
Yet again, buggy, frustrating, confounding Microsoft has managed to make a horrifyingly simple task inspire me to throw my PC out the window and shortly follow it. Consider this new gem:

I'm not getting existing table records showing up in Form View.

a) There's records in the table.
b) The form's Record Source currently contains one-to-one textbox controls from one table. The only control not sourced to that table is not currently sourced to ANYTHING.
c) The Form "Data Entry" property is set to "No"; the "Recordset Type" is "Dynaset (Inconsistent Updates)".for flexibility; the "Allow Additions" property is set to "Yes".
d) The Form Detail "Visible" property is set to "Yes".

Given those, why in the world would I not be seeing the 14 records in the source table, especially with the "Data Entry" property set to "No"?!

Confounding Mr. Gates. Confounding.

Mucho thanks ahead of time for advice on this normally/supposedly easy, yet persistent fix.
Windows XP, Access 2007, .accdb file
 

Visibility of other controls

Visibility of other controls Icon
Sometimes you want to control the visibility (or other property) of one control to be based on the value in another.

I have "Option 42" which is a Y/N selection.
I also have "Label 48" which I want to become active only if Option 42 is Yes.

What is the best thing to do in this situation
 

Question about Northwind Splitform Controls

Question about Northwind Splitform Controls Icon
all,

I am looking at the NW example, and all of the buttons on the split forms look like this:

Can anyone tell what property is connecting the actual button to the detail section of the split form like that? That sort of thing happens automatically when you create a new columnar autoform in pre-07 versions, but I'm unsure of how to make one of those "connecting" type controls myself. each of them do have something in the TAG field, but it doesn't make much sense.

does anyone know what prop causes that? or how to make one
 

How to use Access Columns Types in .NET

How to use Access Columns Types in .NET Icon
I need to know if there is way to figure out if a particular Column in an Access Table is of type "ComboBox" or "TextBox". For Example:

In Access I'm having a table "XYZ". This has 2 Columns "X" and "Y". In Access, I've assigned the "Display Control" tag (Open any Access Table->Go o to "Design View"-> Go to "Lookup" tab) as "Combobox" for Column "X" and as "TextBox" for Column "Y".

Is there a way that I can query this property in my C# code? i.e.

dc = DataTable.Columns[0];
if (dc.<To Figure Out>.ComboBox
 

Creating Label Hyperlinks

Creating Label Hyperlinks Icon
I have a dashboard program with a "navigation" menu on the left. This "navigation" menu has labels that are filled in at runtime with one field of a recordset. I want each label that is filled in to then link back to the record it represents. Is this possible to do, and if so, what is the procedure. I have looked at the label object, hyperlink property, and I can't find a good example of how to link it (in code) to a single record
 

Access 2007 - Change Backcolor Of Specific Labels

Access 2007 - Change Backcolor Of Specific Labels Icon
I have a series of labels on an Access Form.

Depending on the labels caption, I need to change the backcolor.

The first 5 characters of the labels will be the same (Cap x).

Example:
Cap 1-1
Cap 1-2
Cap 1-3
Cap 1-4
Cap 1-5

Cap 2-1
Cap 2-2
Cap 2-3
Cap 2-4
Cap 2-5

I want to change all labels where the number portion begins with 2, so I do this

Private Sub Command1_Click()
Dim ctrl As Control
For Each ctrl In Forms("NameOfForm").Controls
If TypeOf ctrl Is Label Then
If ctrl.Caption Like "Cap 2" Then
ctrl.BackColor = vbBlue
ctrl.ForeColor = vbWhite
End If
End If
Next
End Sub

All of the labels have their backstyle set to Normal.

The problem is that none of the labels are getting their backcolors changed. I put a break on the code and stepped through it.it is finding the controls on the form that are labels, but it is not find the label controls that have a caption like Cap 2.