473,806 Members | 2,707 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Continous Form

553 Contributor
Hi

I know how to implement Continous form. In the method i have tried, the source for data on the continous form comes from table using SQL query

Now, i want to try something different and i need your help.

With the same continous form, i want the source for the data to be a simple piece of code that returns names of files in the folder.

I have completed working code for getting file names in the folder:

Expand|Select|Wrap|Line Numbers
  1. Dim fs
  2. Set fs = Application.FileSearch
  3. With fs
  4. .LookIn = "c:\abc"
  5. .FileName = "*.doc"
  6. .searchsubfolders = False
  7. fs.Execute
  8.  
  9. For j = 1 To .Foundfiles.Count
  10. MsgBox .Foundfiles(j)
  11. ' --------- Me.subf.Form.RecordSource = .Foundfiles(j)   -- how to do this thing? ---
  12. Next j
  13. End With
  14.  
There is no problem with that. Now please help me in displaying the result of the above code (returned using .FoundFiles(j) )
on the continous form.. How to go about doing this?

Awaiting your responce

Thanks
qi
Jul 24 '08 #1
2 1411
MikeTheBike
639 Recognized Expert Contributor
Hi

I know how to implement Continous form. In the method i have tried, the source for data on the continous form comes from table using SQL query

Now, i want to try something different and i need your help.

With the same continous form, i want the source for the data to be a simple piece of code that returns names of files in the folder.

I have completed working code for getting file names in the folder:

Expand|Select|Wrap|Line Numbers
  1. Dim fs
  2. Set fs = Application.FileSearch
  3. With fs
  4.     .LookIn = "c:\abc"
  5.     .FileName = "*.doc"
  6.     .searchsubfolders = False
  7.     fs.Execute
  8.  
  9.     For j = 1 To .Foundfiles.Count
  10.  
  11.         ' --------- Me.subf.Form.RecordSource = .Foundfiles(j)   -- how to do this thing? ---
  12.     Next j
  13. End With
  14.  
There is no problem with that. Now please help me in displaying the result of the above code (returned using .FoundFiles(j) )
on the continous form.. How to go about doing this?

Awaiting your responce

Thanks
qi
Hi

Why do you want to display then in a continuous form?

It would be pretty simple to display them in a list box !?

Expand|Select|Wrap|Line Numbers
  1. With fs
  2.     .LookIn = "c:\abc"
  3.     .FileName = "*.doc"
  4.     .searchsubfolders = False
  5.     fs.Execute
  6.  
  7.     Dim strSource as String
  8.     strSource = ";"
  9.     For j = 1 To .Foundfiles.Count
  10.         strSource =  & strSource & ";" & .Foundfiles(j)
  11.     Next j 
  12. End With
  13.  
  14. List1.RowSourceType = "Value List"
  15. List1.RowSource = Mid(strSource,2)      '--Mid()  Remove leading ';'
  16.  
??

MTB
Jul 25 '08 #2
questionit
553 Contributor
Thanks a lot for this suggestion MTB.

It would be more easily readable the list on a Continous Form instead.

Could you please guide me if this could be done.

Perhaps, save the returned values into a table then query the table to assign its result to the Continous Form -this should work but is a lengthy way though!

Let me know any solutions for this

Thanks
Qi

Hi

Why do you want to display then in a continuous form?

It would be pretty simple to display them in a list box !?

Expand|Select|Wrap|Line Numbers
  1. With fs
  2.     .LookIn = "c:\abc"
  3.     .FileName = "*.doc"
  4.     .searchsubfolders = False
  5.     fs.Execute
  6.  
  7.     Dim strSource as String
  8.     strSource = ";"
  9.     For j = 1 To .Foundfiles.Count
  10.         strSource =  & strSource & ";" & .Foundfiles(j)
  11.     Next j 
  12. End With
  13.  
  14. List1.RowSourceType = "Value List"
  15. List1.RowSource = Mid(strSource,2)      '--Mid()  Remove leading ';'
  16.  
??

MTB
Jul 25 '08 #3

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

Similar topics

2
5140
by: JK | last post by:
Hi All, I am working a form which is tabular layout (continuous form) which will display multiple records at a time. Each line of record needs to be reflected on the color code to show their current status. In Access 2000, you can only write the code on each control in a general way and the code will apply on to the current record. For instance, if you have 5 customers in display, each one of them has difference balance, if you like to...
1
2333
by: adolph | last post by:
I would like to add a check box to the detail area of a continous form. So that I can check on specific records, then after I've marked all the records I watn to delte, click a button to loop thru these check boxes, if checked get the field with the underlying table record ID and run a query to delete it. I've built a continous form to show all the records. I now want to add a check box beside each record, so that I can check specific...
6
1652
by: DS | last post by:
I have a continous form that records payments. I' starting out with a bill of lets say $10.00. What I want to happen is that when I apply a payment a new record is made. In that new record I want the remaining amount left from the $10.00 to appear in the new record. Lets say I apply $6.00, I want a new record with $4.00 in it How would I pick up the value remaining and apply it to the new record. Thanks DS
0
1732
by: gavo | last post by:
Hi. using A2K; i have a form containing a continous subform. The question is, how can i call a calculation for one of the fields in the continous subform from the main form. At the moment i have a button on the main form that will call a public code containing the calculation i need, the problem i have is that it will only perform the calculation on the first record on the continous subform and i need it for all the records
0
1427
by: ReidarT | last post by:
I have started to develop in vb.net. Earlier development was in MS-Access. I need a lot of continous forms to present data. The customer add and edits data in the continous form. Is use of datagrid the way I should do it in vb.net? I need up to 1000 records in a continous form (mostly 3-400) regards reidarT
5
4549
by: Nothing | last post by:
I have a search results form that is being displayed as a continous form. I want to double click the name and then using VBA select the different columns of information. For Example: Name City DL# Last Bid# Michael Toledo Unknown 139 Robert Cleveland 123456 254
1
2839
by: Kev | last post by:
Hi, I am trying to total a column (Shift1) in a subform (continous forms) from the after update event of the (Shift1) column control within the subform. This column stores shift codes, I want to sum the hours associated with these shift codes from the RosterShifts Table. ie. Shift1 may = D The D shift is 8 hours long I am using Dictionary objects within the form as suggested by Gord,
2
1713
by: access baby | last post by:
How do i create continous form i created main form with subform drag and drop into main form but the subform shows me the 1st record of the customer . how can i link main form with subform i tried to search web but in vain. Please Help.
5
2134
by: AccessHunter | last post by:
Hi, I have a continous form that displays Name and Address of Suppliers. In the form there is a combo box for 'Active Address' and 10 other text boxes. All the fields coem from one table, "Primary Suppliers". The combobox is for 'Active Address' with values 'Yes' and 'No'.Control source of the form is, Select * from PrimarySuppliers where ="Yes". I want the form to display only the Suppliers who has 'Active address' = "Yes".If user selects...
0
9719
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10624
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10371
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10374
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10111
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9193
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4330
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3010
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.