473,326 Members | 2,081 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

show only unhidden access forms in combo box

Hi

I want to list my unhidden access forms, reports, in a combo box. this is the piece of code i already use and it works great but it also shows me the hidden objects. I don't know how to exclude the hidden objects.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.     Call GetList
  3. End Sub
Expand|Select|Wrap|Line Numbers
  1. Public Sub GetList()
  2.     Dim Item As AccessObject
  3.  
  4.     For Each Item In CurrentProject.AllForms
  5.         DBItem.RowSourceType = "Value List"
  6.         DBItem.AddItem Item.Name
  7.     Next
  8. End Sub
Please help.
May 23 '10 #1

✓ answered by Jim Doherty

@TrevoriousD
Welcome to Bytes :-)

Expand|Select|Wrap|Line Numbers
  1. For Each Item In CurrentProject.AllForms
  2. If Application.GetHiddenAttribute(Item.Type, Item.Name) = False Then
  3. '......do your logic code here
  4. End if
  5. Next

3 1370
Jim Doherty
897 Expert 512MB
@TrevoriousD
Welcome to Bytes :-)

Expand|Select|Wrap|Line Numbers
  1. For Each Item In CurrentProject.AllForms
  2. If Application.GetHiddenAttribute(Item.Type, Item.Name) = False Then
  3. '......do your logic code here
  4. End if
  5. Next
May 24 '10 #2
BRILLIANT!!!!!! It works. Thanks so much for the help.

trevoriousd
May 24 '10 #3
Jim Doherty
897 Expert 512MB
@TrevoriousD
You are welcome :-)
May 24 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: mamatha | last post by:
Hi I have Access forms and i want to add our company's logo to that form.How can i add,if any one knows let me know.
2
by: Kim Skytte | last post by:
HI! I have a few questions about access . 1) Does anyone know if it is possible to apply skins to Access forms ?? 2) Is is possible to hide the main access windows, and just show the forms.
7
by: James Fortune | last post by:
In response to different users or situations (data context) I transform the appearance and characteristics of Access Forms through code. This seems to fit in with the idea of polymorphism. Do...
1
by: Ray | last post by:
To select all, I leave the combo box blank and press Enter. In my query for my criteria I use like Forms!! &"*" It does not work when I open the form. I need to press the space bar or...
7
by: dtecmeister | last post by:
Looking to see how many people could use this kind of tool. I've got several large databases I've developed in Access with MySQL as the back-end. I've started using Linux instead of windows and...
3
by: mumbaimacro | last post by:
hi i am a newbie to access programming,, i need help to 1. view PDF inside Ms-access forms whether the PDF Location from the Folder or the Path in table. 2. view ms- photoeditor...
19
by: jalmar | last post by:
My question is related to Access forms. I have set up an Access form using 4 different tables~I am pulling 2 different numbers and the name of Trusts out of one table, I am pulling custodian name...
0
by: annivanova | last post by:
Hi, I saw posts in Dependent listboxes on access forms, which problem is very similar to my. I’m from Bulgaria and working over to create an MS Access application. I used in my project given code...
2
by: =?Utf-8?B?UGV0ZQ==?= | last post by:
Happy New Year everyone. Quick question: does anyone know a good tool for converting Access forms into VB.Net form? Pete
2
by: Luting | last post by:
Hi, Is it possible to update oracle via Access forms? I am thinking maybe I could make a link table connnected with oracle database. And the form could be based on the link table. Does this...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.