Senin, 02 Oktober 2017

Re: [MS_AccessPros] Re: Grouping controls together in Access

 

I have 2 sets of 10 controls that I need to show dependent on the mode the screen is in. If its in search mode I display a set of 10 comboboxes that have table data in them and each of the combo labels contain the name of the field pulled fro the table. eg. Vendor (label), ABC, Inc, BBC, etc would be inthe comboboxes). Now if the screen is in Add mode then a set of 10 textboxes is displayed and the user adds appropriate data, Vendor, Addresss, Phone, etc. If the screen is in data enty mode, again 10 textboxes is diplayed and the user enteres the data for each of the fields (ABC< 123 Main Street, 605-272-2222, etc).

The orginal project was written in vb6 and is now being rewritten in VBA and Access. It uses a lot of control arrays which no longer exist.


With Warm Regards,
 
Arthur D. Lorenzini
IT System Manager
Cheyenne River Housing Authority
Wk.(605)964-4265  Ext. 130
Fax (605)964-1070

"Valar Dohaeris"






On ‎Monday‎, ‎October‎ ‎2‎, ‎2017‎ ‎10‎:‎16‎:‎28‎ ‎AM, wrmosca@comcast.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:


 

Art


What is the reason for grouping? I always use the control property Tag and set a string so I can loop through controls in a section like this:

Private Function MyFunction()
    Dim ctrl as Control
    
    For each ctrl in Me.Detail.Controls
        If ctrl.Tag = "Tax Group" Then
            'Do something
        End if
    Next
End  Function  

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

 



---In MS_Access_Professionals@yahoogroups.com, <dbalorenzini@yahoo.com> wrote :

I need a way to group a set up textboxes and comboboxes together. Does Access have a container control that wil ldo this besides the Tab control. I know Vb has a Panel and Frame Control and I teste The Option Group but it is just for options buttons. Is there away to achieve this effect, in most case the group of controls would be visible on not visible. But there are a few variance here also.


Thank you for any ideas you may have.


Art Lorenzini

SD

__._,_.___

Posted by: Art Lorenzini <dbalorenzini@yahoo.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Re: Hyperlinks Issue - Urgent Please !!!

 

Ashfaque - There seems to be a problem with your follow-up post about not being able to upload files. I've responded to it twice and my responses are not showing.


To upload a file, first compact the datqabase (devoid of sensitive data), compact it, and then upload it to our Files>2_Assistence Needed folder.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <ashfaque_online@yahoo.com> wrote :

Hi,

 

My Access VBA code successfully exports data in READ-ONLY Excel file (VehExpReport.xlsx) kept at a particular destination and when each time user need to save that excel file, he can save it at different locations as desired and the original read-only excel file shall be at the same path.

 

This was done successfully. My VBA code sets Excel Application, open the file from given path and adds number of sheets in VehExpReport.xlsx.

 

(data is actually Vehicle maintenance expenses) When my code start executing, it opens VehExpReport.xlsx file from the given destination and adds separate sheet for each vehicle with their maintenance expenses. Let us suppose if there are 5 vehicles then it will generate 5 sheets and 1 additional sheet at last called SUMMARY in which it is collecting all vehicle numbers and total expense that spent on the maintenance of that particular vehicle.

 

Up to here this is being carried out greatly.

 

When the Excel file VehExpReport.xlsx on the screen, I want a hyperlinks on each vehicle number mentioned onto the SUMMARY sheet so that user can click the vehicle number link and control will take directly to your referral sheet.

 

To do this I did a small work which is partly success. Mean the underscore with Blue text is generating over each Vehicle numbers on SUMMARY sheet but in fact nothing achieved.

 

Public Sub InsertDates()

  Dim objXl As Excel.Application

  Dim objWkb As Excel.Workbook

  Dim objSht As Excel.Worksheet

  Dim rstNames As DAO.Recordset, rst As DAO.Recordset

  Dim iRow As Integer, x As Long



Dim DRec As Recordset

 

 

  Set rstNames = CurrentDb.OpenRecordset("SELECT VNo, SumofAmount FROM Q1;")

  If rstNames.EOF And rstNames.BOF Then

    MsgBox ("No Records In This Month"), vbInformation, "Null Records Inf."

  Else

    Set objXl = New Excel.Application

    objXl.Visible = True

    Set objWkb = objXl.Workbooks.Open("D:\VehicleDB\VehExpReport\VehExpReport.xlsx")

     Do

      Set objSht = objWkb.Worksheets.Add()

      

      Set rst = CurrentDb.OpenRecordset("SELECT [T_VehExp.VNo], [T_VehExp.VEDate], [T_VehExp.JobNo], " & _

      "[T_VehExp.InvoiceNo], [T_VehExp.VehicleModel], [T_VehExp.VDate], [T_VehExp.Expense Description], [T_VehExp.Amount], " & _

      "[T_VehExp.KM], [T_VehExp.Remarks], [T_VehExp.Part], [T_VehExp.MechanicName] FROM T_VehExp " & _

      "WHERE [T_VehExp.VNo] ='" & rstNames![VNo] & "' ;")

 

      If rst.EOF And rst.BOF Then

.....

...Code lines ....

 

Below is the problmatic...

 

'===================================================================

           ' ADD MAIN-ADDRESS

               objXl.Cells.Hyperlinks.Add _

                Anchor:=objXl.Cells(SRow, 2), _

                    Address:="", _

                        SubAddress:="", _

                            ScreenTip:="-", _

                                TextToDisplay:=""

       

 

'            ' ADD SUB-ADDRESS

'           objSht("Sheet2").Hyperlinks.Add _

'                Anchor:=objSht(rstNames![VNo]).Cells(cell.Row, 1), _

'                    Address:="", _

'                        SubAddress:=objSht.Name & "rstNames![VNo]" & cell.Address, _

'                            ScreenTip:="", _

'                                TextToDisplay:=""

'===================================================================

 

Instead of copying code at this forum, I have would like to attach my db with few records for your ref. unfortunately, it looks the net is supporting to his Please check and help me out.

 

 

Thanks in advance

Ashfaque

 

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Re: Hyperlinks Issue - Urgent Please !!!

 

Ashfaque


I replied to this earlier but it looks like it got lost. Compact your database (devoid of sensitive data) and zip it. Then upload it to our Files>2_AssistenceNeeded folder.

Keep in mind not everyone has time to diagnose problems in a database. Sometimes just posting the code in question is enough for our experts.

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <ashfaque_online@yahoo.com> wrote :

I tried to upload my db but it looks it is NOT possible.

Can someone share with me how can I upload my db?

Thanks,
Ashfaque Hussain

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Re: Grouping controls together in Access

 

Art


What is the reason for grouping? I always use the control property Tag and set a string so I can loop through controls in a section like this:

Private Function MyFunction()
    Dim ctrl as Control
    
    For each ctrl in Me.Detail.Controls
        If ctrl.Tag = "Tax Group" Then
            'Do something
        End if
    Next
End  Function  

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

 



---In MS_Access_Professionals@yahoogroups.com, <dbalorenzini@yahoo.com> wrote :

I need a way to group a set up textboxes and comboboxes together. Does Access have a container control that wil ldo this besides the Tab control. I know Vb has a Panel and Frame Control and I teste The Option Group but it is just for options buttons. Is there away to achieve this effect, in most case the group of controls would be visible on not visible. But there are a few variance here also.


Thank you for any ideas you may have.


Art Lorenzini

SD

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Re: [belajar-access] Memunculkan form lain dalam subform

 

Mungkin maksudnya Mas Yadi, ingin menambahkan tombol/common button itu di subform, agar tampil saat di load.

Agar muncul tombol itu di Form Propertiesnya Default View=Continuous Forms
Karena kalau pilih Datasheet semua tombol tidak akan tampil

Pada 30 September 2017 07.38, Yadi yadisupriyadi83@yahoo.co.id [belajar-access] <belajar-access@yahoogroups.com> menulis:
 

Dear mas nino

Maaf email sebelumnya kurang spesifik, maksud sy memunculkan tombol tersebut di field / kolom untuk membuka form... 

Trims
Yadi

Pada tanggal 27 Sep 2017 3.46 PM, "'NinoGuevara@Gmail.com' ninoguevara@gmail.com [belajar-access]" <belajar-access@yahoogroups.com> menulis:
 

Dear Mas Yadi,

Bisa .. di tombol yang bersangkutan buat saja event Open Form, maka saat tombol ditekan sebuah form akan terbuka.

Rgds,
NGR



On 26/09/2017 14.35, Yadi yadisupriyadi83@yahoo.co.id [belajar-access] wrote:
 
Dear all

Bisa kah access memunculkan form lain dengan menekan button dalam kolom subform seperti gambar (kolom size). 

Mohon pencerahannya

Trim's
Yadi




--
ABRISAM ROSYID

Telp.
HP: +62 896-8518-7025


__._,_.___

Posted by: Agung Santoso <programpajak@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.

SPAM IS PROHIBITED

.

__,_._,___

Minggu, 01 Oktober 2017

[MS_AccessPros] Re: Hyperlinks Issue - Urgent Please !!!

 

I tried to upload my db but it looks it is NOT possible.


Can someone share with me how can I upload my db?

Thanks,
Ashfaque Hussain

__._,_.___

Posted by: ashfaque_online@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

[MS_AccessPros] Hyperlinks Issue - Urgent Please !!!

 

Hi,

 

My Access VBA code successfully exports data in READ-ONLY Excel file (VehExpReport.xlsx) kept at a particular destination and when each time user need to save that excel file, he can save it at different locations as desired and the original read-only excel file shall be at the same path.

 

This was done successfully. My VBA code sets Excel Application, open the file from given path and adds number of sheets in VehExpReport.xlsx.

 

(data is actually Vehicle maintenance expenses) When my code start executing, it opens VehExpReport.xlsx file from the given destination and adds separate sheet for each vehicle with their maintenance expenses. Let us suppose if there are 5 vehicles then it will generate 5 sheets and 1 additional sheet at last called SUMMARY in which it is collecting all vehicle numbers and total expense that spent on the maintenance of that particular vehicle.

 

Up to here this is being carried out greatly.

 

When the Excel file VehExpReport.xlsx on the screen, I want a hyperlinks on each vehicle number mentioned onto the SUMMARY sheet so that user can click the vehicle number link and control will take directly to your referral sheet.

 

To do this I did a small work which is partly success. Mean the underscore with Blue text is generating over each Vehicle numbers on SUMMARY sheet but in fact nothing achieved.

 

Public Sub InsertDates()

  Dim objXl As Excel.Application

  Dim objWkb As Excel.Workbook

  Dim objSht As Excel.Worksheet

  Dim rstNames As DAO.Recordset, rst As DAO.Recordset

  Dim iRow As Integer, x As Long



Dim DRec As Recordset

 

 

  Set rstNames = CurrentDb.OpenRecordset("SELECT VNo, SumofAmount FROM Q1;")

  If rstNames.EOF And rstNames.BOF Then

    MsgBox ("No Records In This Month"), vbInformation, "Null Records Inf."

  Else

    Set objXl = New Excel.Application

    objXl.Visible = True

    Set objWkb = objXl.Workbooks.Open("D:\VehicleDB\VehExpReport\VehExpReport.xlsx")

     Do

      Set objSht = objWkb.Worksheets.Add()

      

      Set rst = CurrentDb.OpenRecordset("SELECT [T_VehExp.VNo], [T_VehExp.VEDate], [T_VehExp.JobNo], " & _

      "[T_VehExp.InvoiceNo], [T_VehExp.VehicleModel], [T_VehExp.VDate], [T_VehExp.Expense Description], [T_VehExp.Amount], " & _

      "[T_VehExp.KM], [T_VehExp.Remarks], [T_VehExp.Part], [T_VehExp.MechanicName] FROM T_VehExp " & _

      "WHERE [T_VehExp.VNo] ='" & rstNames![VNo] & "' ;")

 

      If rst.EOF And rst.BOF Then

.....

...Code lines ....

 

Below is the problmatic...

 

'===================================================================

           ' ADD MAIN-ADDRESS

               objXl.Cells.Hyperlinks.Add _

                Anchor:=objXl.Cells(SRow, 2), _

                    Address:="", _

                        SubAddress:="", _

                            ScreenTip:="-", _

                                TextToDisplay:=""

       

 

'            ' ADD SUB-ADDRESS

'           objSht("Sheet2").Hyperlinks.Add _

'                Anchor:=objSht(rstNames![VNo]).Cells(cell.Row, 1), _

'                    Address:="", _

'                        SubAddress:=objSht.Name & "rstNames![VNo]" & cell.Address, _

'                            ScreenTip:="", _

'                                TextToDisplay:=""

'===================================================================

 

Instead of copying code at this forum, I have would like to attach my db with few records for your ref. unfortunately, it looks the net is supporting to his Please check and help me out.

 

 

Thanks in advance

Ashfaque

__._,_.___

Posted by: ashfaque_online@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___