Jumat, 31 Mei 2013

Re: [MS_AccessPros] How am I to tell the report to use the form�s record source?

 

Phucon

PMJI...You can't load the recordset that way. You are trying to do it one record at a time. Just assign each control's ControlSource to the appropriate field. Don't loop through the records.

With Me
.pkeyCustomerID.ControlSource = "pkeyCustomerID"
.strCompanyName.ControlSource = "strCompanyName"
.strContactName.ControlSource = "strContactName"
.strContactTitle.ControlSource = "strContactTitle"
.strCity.ControlSource = "strCity"
.strRegion.ControlSource = "strRegion"
.strPostalCode.ControlSource = "strPostalCode"
.strCountry.ControlSource = "strCountry"
End With

Me.RecordSource = strSQL
Me.Requery

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, "saigonf7q5" <saigonf7q5@...> wrote:
>
>
>
>
>
>
> Thanks Duane. It works perfectly.
>
> I tried another version of displaying records on the (Continuous) form. However I can't figure out why it keeps displaying the same record while it should move to the next. I suspected the MoveNext statement wasn't placed correctly. was it? Phucon.
>
> RANCH Rancho grande Sergio Gutiérrez Sales Representative Buenos Aires 1010 Argentina
> RANCH Rancho grande Sergio Gutiérrez Sales Representative Buenos Aires 1010 Argentina
> RANCH Rancho grande Sergio Gutiérrez Sales Representative Buenos Aires 1010 Argentina
>
>
> Private Sub cboCountry_AfterUpdate()
>
> Dim db As DAO.Database
> Dim rs As DAO.Recordset
> Dim strSQL As String
>
> strSQL = "SELECT distinct pkeyCustomerID, strCompanyName, strContactName, strContactTitle, strCity, strRegion, " & _
> "strPostalCode, strCountry " & _
> "FROM qryCustomers WHERE strCountry= " & Chr$(34) & Me.cboCountry & Chr$(34) & ""
>
> Set db = CurrentDb
> Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)
>
> Me.RecordSource = strSQL
>
> If Not rs.EOF Then
> Do
> With Me
> .pkeyCustomerID = rs!pkeyCustomerID
> .strCompanyName = rs!strCompanyName
> .strContactName = rs!strContactName
> .strContactTitle = rs!strContactTitle
> .strCity = rs!strCity
> .strRegion = rs!strRegion
> .strPostalCode = rs!strPostalCode
> .strCountry = rs!strCountry
> End With
> rs.MoveNext
> Loop Until rs.EOF
> End If
>
> rs.Close
> Set rs = Nothing
> Set db = Nothing
>
> End Sub
>
>
> --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@> wrote:
> >
> > Try,
> >
> > Private Sub cmdOpenRpt_Click()
> >  
> >    Dim strWhere as String
> >    strWhere = Me.Filter
> >    DoCmd.OpenReport "RptCustomers", acViewPreview, ,strWhere , acWindowNormal
> >
> > End Sub
> >
> > Duane Hookom MVP
> > MS Access
> >
> > ----------------------------------------
> > > From: saigonf7q5@
> > >
> > > Hello Duane
> > >
> > > Here's the 2 procedures that in the form.
> > >
> > > combo box rowsource:
> > > SELECT DISTINCT qryCustomers.strCountry FROM qryCustomers;
> > >
> > > criteria which user enters:
> > > Private Sub cboCountry_AfterUpdate()
> > >
> > > Me.Filter = "strCountry = " & Chr$(34) & Me.cboCountry & Chr$(34) & ""
> > > Me.FilterOn = True
> > >
> > > 'Debug.Print Me.Filter
> > >
> > >
> > > End Sub
> > >
> > >
> > > Private Sub cmdOpenRpt_Click()
> > >
> > > Dim strCntryName As String
> > > strCntryName = Me.cboCountry
> > >
> > > DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
> > >
> > > End Sub
> > >
> > >
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@> wrote:
> > >>
> > >> Phucon,
> > >>
> > >> Tell us how you are using the combo box to filter the form records. I expect you could use a similar expression as a WHERE CONDITION in the DoCmd.OpenReport method.
> > >>
> > >> Duane Hookom MVP
> > >> MS Access
> > >>
> > >> ----------------------------------------
> > >>> From: saigonf7q5@
> > >>>
> > >>> My form has a combo box for filtering records, and a Cmdbutton to open a report.
> > >>>
> > >>> I have been trying to pass the form's OpenArgs to the Report_Open procedue, so the report's Recordsource can base on the criteria that the user selected from the form. How am I to tell the report to use the form's record source?
> > >>>
> > >>> Below's what I have been trying to do.
> > >>>
> > >>> Private Sub cmdOpenRpt_Click()
> > >>>
> > >>> Dim strCntryName As String
> > >>>
> > >>> strCntryName = Me.cboCountry
> > >>>
> > >>> DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
> > >>>
> > >>> End Sub
> > >>>
> > >>> Private Sub Report_Open(Cancel As Integer)
> > >>> Me.OpenArgs
> > >>> End Sub
> > >>>
> > >>> Thanks
> > >>> Phucon
> > >>
> > >
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > Yahoo! Groups Links
> > >
> > >
> > >
> >
>

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

__,_._,___

Re: [MS_AccessPros] How am I to tell the report to use the form�s record source?

 



Thanks Duane. It works perfectly.

I tried another version of displaying records on the (Continuous) form. However I can't figure out why it keeps displaying the same record while it should move to the next. I suspected the MoveNext statement wasn't placed correctly. was it? Phucon.

RANCH Rancho grande Sergio Gutiérrez Sales Representative Buenos Aires 1010 Argentina
RANCH Rancho grande Sergio Gutiérrez Sales Representative Buenos Aires 1010 Argentina
RANCH Rancho grande Sergio Gutiérrez Sales Representative Buenos Aires 1010 Argentina

Private Sub cboCountry_AfterUpdate()

Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String

strSQL = "SELECT distinct pkeyCustomerID, strCompanyName, strContactName, strContactTitle, strCity, strRegion, " & _
"strPostalCode, strCountry " & _
"FROM qryCustomers WHERE strCountry= " & Chr$(34) & Me.cboCountry & Chr$(34) & ""

Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)

Me.RecordSource = strSQL

If Not rs.EOF Then
Do
With Me
.pkeyCustomerID = rs!pkeyCustomerID
.strCompanyName = rs!strCompanyName
.strContactName = rs!strContactName
.strContactTitle = rs!strContactTitle
.strCity = rs!strCity
.strRegion = rs!strRegion
.strPostalCode = rs!strPostalCode
.strCountry = rs!strCountry
End With
rs.MoveNext
Loop Until rs.EOF
End If

rs.Close
Set rs = Nothing
Set db = Nothing

End Sub

--- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@...> wrote:
>
> Try,
>
> Private Sub cmdOpenRpt_Click()
>  
>    Dim strWhere as String
>    strWhere = Me.Filter
>    DoCmd.OpenReport "RptCustomers", acViewPreview, ,strWhere , acWindowNormal
>
> End Sub
>
> Duane Hookom MVP
> MS Access
>
> ----------------------------------------
> > From: saigonf7q5@...
> >
> > Hello Duane
> >
> > Here's the 2 procedures that in the form.
> >
> > combo box rowsource:
> > SELECT DISTINCT qryCustomers.strCountry FROM qryCustomers;
> >
> > criteria which user enters:
> > Private Sub cboCountry_AfterUpdate()
> >
> > Me.Filter = "strCountry = " & Chr$(34) & Me.cboCountry & Chr$(34) & ""
> > Me.FilterOn = True
> >
> > 'Debug.Print Me.Filter
> >
> >
> > End Sub
> >
> >
> > Private Sub cmdOpenRpt_Click()
> >
> > Dim strCntryName As String
> > strCntryName = Me.cboCountry
> >
> > DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
> >
> > End Sub
> >
> >
> >
> > --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@> wrote:
> >>
> >> Phucon,
> >>
> >> Tell us how you are using the combo box to filter the form records. I expect you could use a similar expression as a WHERE CONDITION in the DoCmd.OpenReport method.
> >>
> >> Duane Hookom MVP
> >> MS Access
> >>
> >> ----------------------------------------
> >>> From: saigonf7q5@
> >>>
> >>> My form has a combo box for filtering records, and a Cmdbutton to open a report.
> >>>
> >>> I have been trying to pass the form's OpenArgs to the Report_Open procedue, so the report's Recordsource can base on the criteria that the user selected from the form. How am I to tell the report to use the form's record source?
> >>>
> >>> Below's what I have been trying to do.
> >>>
> >>> Private Sub cmdOpenRpt_Click()
> >>>
> >>> Dim strCntryName As String
> >>>
> >>> strCntryName = Me.cboCountry
> >>>
> >>> DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
> >>>
> >>> End Sub
> >>>
> >>> Private Sub Report_Open(Cancel As Integer)
> >>> Me.OpenArgs
> >>> End Sub
> >>>
> >>> Thanks
> >>> Phucon
> >>
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
>

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

__,_._,___

Re: [belajar-access] msaccess to ASP...

 

Klo nyoba sih belum masih serem :) cuman klo mau otak atik bisa pelajarin comersus database menggunakan ms access biasa ane pake untuk toko online. Silakan download diweb resminya www.comersus.com

Sent from my BlackBerry® smartphone from Sinyal Bagus XL, Nyambung Teruuusss...!

From: harry siswanto <hsiswanto@yahoo.com>
Sender: belajar-access@yahoogroups.com
Date: Thu, 30 May 2013 19:44:17 -0700 (PDT)
To: Belajar Access<belajar-access@yahoogroups.com>
ReplyTo: belajar-access@yahoogroups.com
Subject: [belajar-access] msaccess to ASP...

 

Dear Senior,
 
Saya sedang berfikir,
kalo Database di MsAccess seharusnya bisa di Apply ke Web menggunakan ASP.
(biasanya ASP dengan database SQL) atay MsAccess ya dibuka dengan MSAccess Program..
kira2 ada yang sudah pernah Develop ??
Seperti apa gambaran strategy dan tampilannya ??
 
terimakasih sebelumnya
 
 
Regards


Harry Siswanto

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

__,_._,___

Re: [belajar-access] Membuat Program Multiuser Dengan Front-End Microsoft Access dan Back-End Microsoft SQL Server (Bagian 1)

 

 
aslm mohon pencerahan fungsi panggil combobox kenapa tidak bias jalan ketila saya panggil di Form_Load() dengan
call isi awal
 
ini fungsi nya :
 

Function isian_awal()
Dim st, sx, sj, sk, ss, sl As Variant
    cmdKecamatan.Visible = False
    cmdKecamatan.RowSource = ""
    koneksi
        If conn.State <> 0 Then
            Set rsp = conn.Execute("select DISTINCT kec_Nama" _
            & " from kecamatan order by kec_nama asc")
               
            st = ""
            If Not rsp.EOF Then
                Do While Not rsp.EOF
                    st = st & rsp.Fields(0) & ";"
                    rsp.MoveNext
                Loop
            End If
            Next
            End If
            rsp.Close
            Set rsp = Nothing
End Function
 
 

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

__,_._,___

Kamis, 30 Mei 2013

Re: [belajar-access] tanya send data dari lisbox popup form ke texbox form lain

 

Taruh di Even Double Click

Forms![FormA]![ContolA] = Me.Lisbox(1).Value 

Kalau mau ditutup form lisbox popupnya tambahin

DoCmd.Close
 

FormA = form yang memanggilnya
ControlA = Control yang ada diform yang memanggilnya
Lisbox(1).Value = Pembacaan kolom yang ada dilistbox, kalau tidak salah kolom 1 dibaca 0 misal  Listbox(0) 

Mudah2an bisa soalnya belum saya test. hehe

Nurhasim Hasan
misahrunaccess.wordpress.com



From: "Syarif "yaayaat" Hidayat" <yaayaat@yahoo.com>
To: "belajar-access@yahoogroups.com" <belajar-access@yahoogroups.com>
Sent: Friday, 31 May 2013 10:10 AM
Subject: [belajar-access] tanya send data dari lisbox popup form ke texbox form lain

 
salam kenal,


saya sedang membuat aplikasi yang menampilkan popup form dengan listbox dari sebuah form
yang saya inginkan adalah ketika salah satu baris dari lisbox di klik 2 x maka nilai dari row tersebut
akan terkirim ke texbox dari form yang memanggilnya

mohooooon bantuannnyaaa
demi tuhaaaaaaan saya doain masuk surgaaaaaaa buat yg bersedia membantu :)

yaayaat


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

__,_._,___

[belajar-access] cari bahan untuk skripsi

 

Dear Master Access

 

Saya akan menyusun Skripsi dan belum mempunyai bahannya..

Rencananya akan menggunakan Inventory perusahaan…

Sekiranya ada yang bisa membantu saya dalam mencari Referensi Skripsi tentang Inventori.

 

Sebelumnya saya ucapkan banyak terima kasih.

 

Faudzy

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

__,_._,___

RE: [MS_AccessPros] How am I to tell the report to use the form�s record source?

 

Try,

Private Sub cmdOpenRpt_Click()
 
   Dim strWhere as String
   strWhere = Me.Filter
   DoCmd.OpenReport "RptCustomers", acViewPreview, ,strWhere , acWindowNormal

End Sub

Duane Hookom MVP
MS Access

----------------------------------------
> From: saigonf7q5@yahoo.com
>
> Hello Duane
>
> Here's the 2 procedures that in the form.
>
> combo box rowsource:
> SELECT DISTINCT qryCustomers.strCountry FROM qryCustomers;
>
> criteria which user enters:
> Private Sub cboCountry_AfterUpdate()
>
> Me.Filter = "strCountry = " & Chr$(34) & Me.cboCountry & Chr$(34) & ""
> Me.FilterOn = True
>
> 'Debug.Print Me.Filter
>
>
> End Sub
>
>
> Private Sub cmdOpenRpt_Click()
>
> Dim strCntryName As String
> strCntryName = Me.cboCountry
>
> DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
>
> End Sub
>
>
>
> --- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@...> wrote:
>>
>> Phucon,
>>
>> Tell us how you are using the combo box to filter the form records. I expect you could use a similar expression as a WHERE CONDITION in the DoCmd.OpenReport method.
>>
>> Duane Hookom MVP
>> MS Access
>>
>> ----------------------------------------
>>> From: saigonf7q5@...
>>>
>>> My form has a combo box for filtering records, and a Cmdbutton to open a report.
>>>
>>> I have been trying to pass the form's OpenArgs to the Report_Open procedue, so the report's Recordsource can base on the criteria that the user selected from the form. How am I to tell the report to use the form's record source?
>>>
>>> Below's what I have been trying to do.
>>>
>>> Private Sub cmdOpenRpt_Click()
>>>
>>> Dim strCntryName As String
>>>
>>> strCntryName = Me.cboCountry
>>>
>>> DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
>>>
>>> End Sub
>>>
>>> Private Sub Report_Open(Cancel As Integer)
>>> Me.OpenArgs
>>> End Sub
>>>
>>> Thanks
>>> Phucon
>>
>
>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>

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

__,_._,___

Re: [MS_AccessPros] How am I to tell the report to use the form�s record source?

 



Hello Duane

Here's the 2 procedures that in the form.

combo box rowsource:
SELECT DISTINCT qryCustomers.strCountry FROM qryCustomers;

criteria which user enters:
Private Sub cboCountry_AfterUpdate()

Me.Filter = "strCountry = " & Chr$(34) & Me.cboCountry & Chr$(34) & ""
Me.FilterOn = True

'Debug.Print Me.Filter

End Sub

Private Sub cmdOpenRpt_Click()

Dim strCntryName As String
strCntryName = Me.cboCountry

DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName

End Sub

--- In MS_Access_Professionals@yahoogroups.com, Duane Hookom <duanehookom@...> wrote:
>
> Phucon,
>
> Tell us how you are using the combo box to filter the form records. I expect you could use a similar expression as a WHERE CONDITION in the DoCmd.OpenReport method.
>
> Duane Hookom MVP
> MS Access
>
> ----------------------------------------
> > From: saigonf7q5@...
> >
> > My form has a combo box for filtering records, and a Cmdbutton to open a report.
> >
> > I have been trying to pass the form's OpenArgs to the Report_Open procedue, so the report's Recordsource can base on the criteria that the user selected from the form. How am I to tell the report to use the form's record source?
> >
> > Below's what I have been trying to do.
> >
> > Private Sub cmdOpenRpt_Click()
> >
> > Dim strCntryName As String
> >
> > strCntryName = Me.cboCountry
> >
> > DoCmd.OpenReport "RptCustomers", acViewPreview, , , acWindowNormal, strCntryName
> >
> > End Sub
> >
> > Private Sub Report_Open(Cancel As Integer)
> > Me.OpenArgs
> > End Sub
> >
> > Thanks
> > Phucon
>

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

__,_._,___

[belajar-access] tanya send data dari lisbox popup form ke texbox form lain

 

salam kenal,


saya sedang membuat aplikasi yang menampilkan popup form dengan listbox dari sebuah form
yang saya inginkan adalah ketika salah satu baris dari lisbox di klik 2 x maka nilai dari row tersebut
akan terkirim ke texbox dari form yang memanggilnya

mohooooon bantuannnyaaa
demi tuhaaaaaaan saya doain masuk surgaaaaaaa buat yg bersedia membantu :)

yaayaat

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

__,_._,___

[belajar-access] msaccess to ASP...

 

Dear Senior,
 
Saya sedang berfikir,
kalo Database di MsAccess seharusnya bisa di Apply ke Web menggunakan ASP.
(biasanya ASP dengan database SQL) atay MsAccess ya dibuka dengan MSAccess Program..
kira2 ada yang sudah pernah Develop ??
Seperti apa gambaran strategy dan tampilannya ??
 
terimakasih sebelumnya
 
 
Regards


Harry Siswanto

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

__,_._,___