Minggu, 01 Juni 2014

Re: [MS_AccessPros] How do I write a public procedure that 2 different forms can call.

 

Most likely that error is here

 .FindFirst "[" & SearchField & "] = " & SearchValue

Often this is a typo or a logici issue.  If your field is called ProdID, and you pass instead  ProductID, you will get that error because there is no field ProductID in the fields collection.  Same if you have a control called txtBxA and you do me.forms.controls("textBoxA").  There is no item in the controls collection with a named index of textBoxA


On Fri, May 30, 2014 at 9:51 PM, saigonf7q5@yahoo.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
 

Good morning Mr. Mandeno

I first would like to say thank you. It's been quite long since… I finally have got a chance to get back to play with the Public Function that you were helping me with.

 

Now I've got the function working pretty good and it can be called from different forms. However, I am not sure if my code is efficient enough or the statements (such as MoveFirst, MoveLast, check for EOF, Requery, Goto …) is redundant or unnecessary.  I've also tried to create a Sub (resides in the main form) which deletes records in the sub form. However that created a Run-time error '3265' Item not found in this collection.  What part of my code caused that error? Below is my code.

Thank again Mr. Mandeno

Phucon


'Delete record in the main form, this sub's working OK

Private Sub cmdDelOrder_Click()

Call FindFormRecord(Me, "pkeyOrderID", Me.txtOrderID) 'passing Number data type

End Sub

 

'Delete record in the sub form, this created 'error 3265 item not found in this collection'

Private Sub cmdDelProduct_Click()

Call FindFormRecord(Me, "fkeyProductID", Me!subSubTotal.Form!cboProductID)

End Sub

 

Public Function FindFormRecord(

    SearchForm As Access.Form, _

    SearchField As String, _

    SearchValue As Variant, _

    Optional NoMatchMessage As String = "Record not found" _

    ) As Boolean

   

On Error GoTo ErrorHandler

 

With SearchForm.RecordsetClone

    Select Case .Fields(SearchField).Type

        Case dbText

             SearchValue = Chr$(34) & SearchValue & Chr$(34)

        Case dbLong

             SearchValue = SearchValue

    End Select

   

    .MoveFirst

    .MoveLast

   

  If Not .EOF Then

         .FindFirst "[" & SearchField & "] = " & SearchValue

            If Not .NoMatch Then    'if found then delete the record.

                If MsgBox("Deleting " & SearchValue & ".  Proceed to delete?", vbInformation + vbYesNo, "Delete record.") = vbYes Then

                    .Delete

                    .Requery

                End If

            Else

                MsgBox NoMatchMessage

                GoTo ExitcboFindSetup

            End If

    Else

        GoTo ExitcboFindSetup

    End If

End With

   

ExitcboFindSetup:

    Exit Function

   

ErrorHandler:

        MsgBox Err.Number & vbCrLf & Err.Description

        Resume ExitcboFindSetup

End Function

 


__._,_.___

Posted by: Peter Poppe <plpoppe@gmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (6)

.

__,_._,___

RE: [MS_AccessPros] Report Header for a report

 

Hello Robin

 

No, you are not growing senile.  Microsoft has just made it harder to find.

 

Show the “Group, Sort and Total” pane if you cannot already see it at the bottom of the report design screen (Design ribbon > Group & Sort)

 

Now scroll to the bottom of the existing group/sort levels and you will see “Add a group” and “Add a sort”.

 

The new level will be added at the end of the list.  You can use the up and down arrow buttons to change its place in the hierarchy.

 

Best wishes,

Graham

 

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Monday, 2 June 2014 10:02
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Report Header for a report

 

 

I am using Access 2013 on a Win7 system

I am tormented that I cannot find the option to add a Report Header'
to a report which already has page and group headers and footers.

I was able to do this in earlier versions. Have I grown senile, I am
84, or is the option hidden somewhere else? Google help was no help!

Many thanks,

Robin Chapple

__._,_.___

Posted by: "Graham Mandeno" <graham@mandeno.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

.

__,_._,___

[MS_AccessPros] Report Header for a report

 

I am using Access 2013 on a Win7 system

I am tormented that I cannot find the option to add a Report Header'
to a report which already has page and group headers and footers.

I was able to do this in earlier versions. Have I grown senile, I am
84, or is the option hidden somewhere else? Google help was no help!

Many thanks,

Robin Chapple

__._,_.___

Posted by: Robin Chapple <robinski@westnet.com.au>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___

Re: [MS_AccessPros] Re: Hover Color in Command Button changes in MS2013 when form is imported

 

Norbert-


1) Both Bill and I (as do any other MVPs) still have access to internal channels.  That's what Bill used to report your bug.

2) Take a look at FixBroken.zip in Files - 0_Utilities and Add-ins on the group website.  I originally built that to "fix" problems in Name AutoCorrupt, printer specs, and the layout controls added by 2010 that 2007 doesn't like.  You can take a look at the code behind the single form and perhaps disable the code to remove controls, then use it to export all your forms from the old database and import into a new.  The code uses SaveAsText / LoadFromText.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
SQL Queries for Mere Mortals 
(Paris, France)




On Jun 1, 2014, at 8:06 PM, drnorbert@msn.com [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hi Bill,

Thanks for your advice.

1-I use to report the bugs when we had Access conventions every year in the past and MS team use to go to this wonderful meetings. Now we don't have a direct way to report bugs and get news from MS regarding their progress in MSAccess. Who should we contact now?

This is assuming MS still interesting in making Access a better product.


2-In the application I designed there are 202 forms which contains about 650 command buttons.

To clean up the application I created a new blank Access application and import all the objects to it.

Of course to this known bug now I need to rerun in all the forms to rebuilt all the command buttons.

Can you remain me the code I need to use to loop trough all the forms to execute:


SaveAsText, acForm strFrm, "C:\ISM\frm.txt"

LoadFromText acForm, "frmOrders", "C:\ISM\frm.txt"


Thanks

Norbert 



__._,_.___

Posted by: John Viescas <johnv@msn.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (29)

.

__,_._,___

[MS_AccessPros] Re: Hover Color in Command Button changes in MS2013 when form is imported

 

Hi Bill,

Thanks for your advice.

1-I use to report the bugs when we had Access conventions every year in the past and MS team use to go to this wonderful meetings. Now we don't have a direct way to report bugs and get news from MS regarding their progress in MSAccess. Who should we contact now?

This is assuming MS still interesting in making Access a better product.


2-In the application I designed there are 202 forms which contains about 650 command buttons.

To clean up the application I created a new blank Access application and import all the objects to it.

Of course to this known bug now I need to rerun in all the forms to rebuilt all the command buttons.

Can you remain me the code I need to use to loop trough all the forms to execute:


SaveAsText, acForm strFrm, "C:\ISM\frm.txt"

LoadFromText acForm, "frmOrders", "C:\ISM\frm.txt"


Thanks

Norbert 


__._,_.___

Posted by: drnorbert@msn.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (28)

.

__,_._,___

[belajar-access] File - Tata Tertib dan Aturan.txt

 


Tata tertib dan peraturan
Mailing List: belajar-access@yahoogroups.com

1. Mailing list ini membahas mengenai pemrograman Microsoft Access.
2. Tidak diperkenankan mem-posting topik yang tidak ada kaitannya sama sekali dengan pemrograman MS Access, peluang kerja atau tawaran kerja sama dengan keahlian di bidang MS Access, atau pengajaran/kursus MS Acces. Pelanggaran terhadap aturan ini akan di-ban dari keanggotaan milis ini.
3. Mohon berdiskusi dengan baik, dengan semangat membangun, demi kemajuan kita bersama. Hindarilah perbantahan (flame) yang bisa menjadi pertengkaran yang tidak perlu.
4 Hindari reply permintaan one-liner seperti 'saya minta juga dong', 'saya setuju', dan lain-lain yang tidak perlu.
5. Sedapat mungkin memberikan data-data yang lengkap dalam mengajukan suatu masalah untuk memudahkan rekan-rekan sesama member mengidentifikasi dan mencarikan solusi, termasuk memberikan subject yang sesuai dengan isi email, tidak dengan kata-kata seperti "tologing dong", "pusing...", "ada yang bisa bantu..", dll.

Moderator

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (87)
SPAM IS PROHIBITED

.

__,_._,___

[AccessDevelopers] File - Monthly_Notices.txt

 


Monthly notices:

Hi Kids!:

Don't forget to check out our "Links" section at the website for helpful sites. Also take a peek at books that others have found worthwhile in our books database under the 'Database' link of the main AccessDevelopers page. Feel free to add any books or links that you have found useful.

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (119)

Please zip all files prior to uploading to Files section.

.

__,_._,___