A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Allow Additions to NO



 
 
Thread Tools Display Modes
  #1  
Old August 20th, 2004, 02:03 PM
an
external usenet poster
 
Posts: n/a
Default Allow Additions to NO

Very strange...

After change Allow Additions to NO - Thanks to AB - the=20
records with date only between 01 and 12 Feb (all years)=20
don=B4t appear in subform...
It's not surprising?
Someone know why not?
Thanks in advance.
an

  #2  
Old August 21st, 2004, 12:23 AM
Timothy Simmonds
external usenet poster
 
Posts: n/a
Default

Well you might want to check out www.black-bat.tk
It will help I assure you.

"an" wrote:

Very strange...

After change Allow Additions to NO - Thanks to AB - the
records with date only between 01 and 12 Feb (all years)
donĀ“t appear in subform...
It's not surprising?
Someone know why not?
Thanks in advance.
an


  #3  
Old August 21st, 2004, 12:58 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Fri, 20 Aug 2004 06:03:14 -0700, "an"
wrote:

After change Allow Additions to NO - Thanks to AB - the
records with date only between 01 and 12 Feb (all years)
don“t appear in subform...
It's not surprising?
Someone know why not?
Thanks in advance.


I suspect that these are unrelated issues. Could you perhaps post the
SQL view of the subform's recordsource query? It sounds like you might
have inadvertantly converted the Date/Time field to Text (the 01 to 12
sounds like it's looking for months); Access requires that date
literals in a query must be in mm/dd/yyyy format (or an unambiguous
format such as 12-Feb-2004).

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #4  
Old August 21st, 2004, 08:58 PM
an
external usenet poster
 
Posts: n/a
Default

Ok, JV.

I go to check all.
Many thanks for your idea.

an

-----Original Message-----
On Fri, 20 Aug 2004 06:03:14 -0700, "an"
wrote:

After change Allow Additions to NO - Thanks to AB - the=20
records with date only between 01 and 12 Feb (all years)=20
don=B4t appear in subform...
It's not surprising?
Someone know why not?
Thanks in advance.


I suspect that these are unrelated issues. Could you=20

perhaps post the
SQL view of the subform's recordsource query? It sounds=20

like you might
have inadvertantly converted the Date/Time field to Text=20

(the 01 to 12
sounds like it's looking for months); Access requires=20

that date
literals in a query must be in mm/dd/yyyy format (or an=20

unambiguous
format such as 12-Feb-2004).

John W. Vinson[MVP] =20
Come for live chats every Tuesday and Thursday=20
http://go.compuserve.com/msdevapps?l...ccess=3Dpublic
.

  #5  
Old August 22nd, 2004, 01:36 AM
an
external usenet poster
 
Posts: n/a
Default

In order to first time:
Error message Err 3075 (Sintaxe).
I think is in # character, but I don't where...

Private Sub cbxDatas_AfterUpdate()
Dim strSQLSF As String
=20
strSQLSF =3D " SELECT * FROM T_ValAn "
strSQLSF =3D strSQLSF & " WHERE T_ValAn.Param =3D '" &=20
CbxParam & "' And "
strSQLSF =3D strSQLSF & " WHERE T_ValAn.IdCompon =3D " &=20
CbxIdCompon & " And "
' strSQLSF =3D strSQLSF & " T_ValAn.Param =3D '" & CbxParam=20
& "' And "
strSQLSF =3D strSQLSF & " T_ValAnuais.Data =3D #" & Trim
(CbxDatas) & "#"
=20
Me!SubF_HistoricValAn.LinkChildFields =3D ""
Me!SubF_HistoricValAn.LinkMasterFields =3D ""
=20
Me!SubF_HistoricValAn.LinkChildFields=20
=3D "IdCompon;Param;Date"
Me!SubF_HistoricValAn.LinkMasterFields=20
=3D "IdCompon;Param;Dat"
Me.RecordSource =3D strSQLSF
Me.Requery

End Sub

If is possible I would like your help, please.

Grateful in advance.
an

-----Original Message-----
On Fri, 20 Aug 2004 06:03:14 -0700, "an"
wrote:

After change Allow Additions to NO - Thanks to AB - the=20
records with date only between 01 and 12 Feb (all years)=20
don=B4t appear in subform...
It's not surprising?
Someone know why not?
Thanks in advance.


I suspect that these are unrelated issues. Could you=20

perhaps post the
SQL view of the subform's recordsource query? It sounds=20

like you might
have inadvertantly converted the Date/Time field to Text=20

(the 01 to 12
sounds like it's looking for months); Access requires=20

that date
literals in a query must be in mm/dd/yyyy format (or an=20

unambiguous
format such as 12-Feb-2004).

John W. Vinson[MVP] =20
Come for live chats every Tuesday and Thursday=20
http://go.compuserve.com/msdevapps?l...ccess=3Dpublic
.

  #6  
Old August 22nd, 2004, 03:33 AM
John Vinson
external usenet poster
 
Posts: n/a
Default

On Sat, 21 Aug 2004 17:36:36 -0700, "an"
wrote:

Private Sub cbxDatas_AfterUpdate()
Dim strSQLSF As String

strSQLSF = " SELECT * FROM T_ValAn "
strSQLSF = strSQLSF & " WHERE T_ValAn.Param = '" &
CbxParam & "' And "
strSQLSF = strSQLSF & " WHERE T_ValAn.IdCompon = " &
CbxIdCompon & " And "
' strSQLSF = strSQLSF & " T_ValAn.Param = '" & CbxParam
& "' And "
strSQLSF = strSQLSF & " T_ValAnuais.Data = #" & Trim
(CbxDatas) & "#"

Me!SubF_HistoricValAn.LinkChildFields = ""
Me!SubF_HistoricValAn.LinkMasterFields = ""

Me!SubF_HistoricValAn.LinkChildFields
= "IdCompon;Param;Date"
Me!SubF_HistoricValAn.LinkMasterFields
= "IdCompon;Param;Dat"
Me.RecordSource = strSQLSF
Me.Requery

End Sub

If is possible I would like your help, please.


I would like to try to help, but since you do not provide any
information about the values of cbxParam, cbxIdCompon, or cbxDatas I
really have no idea. Please try running this code step by step in
debug mode, and post the value of strSQLSF, and indicate the datatype
(number, text, or date/time) of each of the fields.

Note that the word DATE is a reserved word, and is dangerous to use as
a fieldname. Try using [Date] in the LinkChildFields. Is
T_ValAnuais.Data perhaps intended to be T_ValAnuais.[Date] ?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
  #7  
Old August 22nd, 2004, 07:20 PM
an
external usenet poster
 
Posts: n/a
Default

Sorry for my delay.
One litle explanation.

I forgot change that word for you, because:
In portuguese Date(of Calendar) is Data, and
Data (collection of the facts) is Dados (=dice).
Really is T_ValAnuais.Data (of calendar).

If necessary, is possible to change Data (calendar) do Dt
(abbreviation).

Next, the code in three Combos: cbxIdCompon to choose
Component. Datatype: Number-Long Integer; cbxParam to
Parameters. Datatype: Text; and cbxDatas (Datas: Plural of
Dt in portuguese). Datatype: Date/Time-Short date.

Like this, is all in original words, Ok?
___
Option Compare Database
Option Explicit

Private Sub cbxIdCompon_AfterUpdate()
Dim strSQL As String
Dim strSQLSF As String

CbxParam = Null
CbxDatas = Null

strSQL = "SELECT DISTINCT T_ValAnuais.Param FROM
T_ValAnuais "
strSQL = strSQL & " WHERE T_ValAnuais.IdCompon = " &
CbxIdCompon
strSQL = strSQL & " ORDER BY T_ValAnuais.Param;"

CbxParam.RowSource = strSQL

strSQLSF = "SELECT * FROM T_ValAnuais "
strSQLSF = strSQLSF & " WHERE T_ValAnuais.IdCompon
= " & CbxIdCompon

On Error Resume Next

Me!SubF_HistoricoValAnuais.LinkChildFields
= "IdCompon"
Me!SubF_HistoricoValAnuais.LinkMasterFields
= "IdCompon"
Me.RecordSource = strSQLSF
Me.Requery

End Sub
___

Private Sub cbxParam_AfterUpdate()

Dim strSQL As String
Dim strSQLSF As String

CbxDatas = Null

strSQL = " SELECT DISTINCT T_ValAnuais.Data FROM
T_ValAnuais "
strSQL = strSQL & " WHERE T_ValAnuais.Param = '" &
CbxParam & "' And "
strSQL = strSQL & " T_ValAnuais.IdCompon = " &
CbxIdCompon
strSQL = strSQL & " ORDER BY T_ValAnuais.Data;"

CbxDatas.RowSource = strSQL

strSQLSF = " SELECT * FROM T_ValAnuais "
strSQLSF = strSQLSF & " WHERE T_ValAnuais.Param = '" &
CbxParam & "' And "
strSQLSF = strSQLSF & " T_ValAnuais.IdCompon = " &
CbxIdCompon

Me!SubF_HistoricoValAnuais.LinkChildFields = ""
Me!SubF_HistoricoValAnuais.LinkMasterFields = ""

Me!SubF_HistoricoValAnuais.LinkChildFields
= "IdCompon;Param"
Me!SubF_HistoricoValAnuais.LinkMasterFields
= "IdCompon;Param"
Me.RecordSource = strSQLSF
Me.Requery

End Sub
___

Private Sub cbxDatas_AfterUpdate()
Dim strSQLSF As String

strSQLSF = " SELECT * FROM T_ValAnuais "
strSQLSF = strSQLSF & " WHERE T_ValAnuais.IdCompon = "
& CbxIdCompon & " And "
strSQLSF = strSQLSF & " T_ValAnuais.Param = '" &
CbxParam & "' And "
strSQLSF = strSQLSF & " T_ValAnuais.Data = #" & Trim
(CbxDatas) & "#"

Me!SubF_HistoricoValAnuais.LinkChildFields = ""
Me!SubF_HistoricoValAnuais.LinkMasterFields = ""

Me!SubF_HistoricoValAnuais.LinkChildFields
= "IdCompon;Param;Data"
Me!SubF_HistoricoValAnuais.LinkMasterFields
= "IdCompon;Param;Data"
Me.RecordSource = strSQLSF
Me.Requery

End Sub
___

Private Sub cmdShowAll_Click()
On Error GoTo err_cmdShowAll_Click

CbxIdCompon = Null
CbxParam = Null
CbxDatas = Null
Me!SubF_HistoricoValAnuais.LinkChildFields = ""
Me!SubF_HistoricoValAnuais.LinkMasterFields = ""
Me.RecordSource = "T_ValAnuais"
Me.Requery

exit_cmdShowAll_Click:
Exit Sub

err_cmdShowAll_Click:
MsgBox Err.Description
Resume exit_cmdShowAll_Click

End Sub
___

Private Sub Form_Open(Cancel As Integer)

Dim strSQL As String

strSQL = " SELECT DISTINCT T_ValAnuais.IdCompon FROM
T_ValAnuais ORDER BY T_ValAnuais.IdCompon;"
CbxIdCompon.RowSource = strSQL

End Sub
___

Many thank you for all
an

age-----
On Sat, 21 Aug 2004 17:36:36 -0700, "an"
wrote:

....

I would like to try to help, but since you do not provide

any
information about the values of cbxParam, cbxIdCompon, or

cbxDatas I
really have no idea. Please try running this code step by

step in
debug mode, and post the value of strSQLSF, and indicate

the datatype
(number, text, or date/time) of each of the fields.

Note that the word DATE is a reserved word, and is

dangerous to use as
a fieldname. Try using [Date] in the LinkChildFields. Is
T_ValAnuais.Data perhaps intended to be T_ValAnuais.

[Date] ?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
.

  #8  
Old August 23rd, 2004, 07:20 PM
an
external usenet poster
 
Posts: n/a
Default

Ok, JV.
Problem solved with (Format(cbDatas, "mm-dd-yyyy"))...
Many thanks.
an

-----Original Message-----
On Sat, 21 Aug 2004 17:36:36 -0700, "an"
wrote:

Private Sub cbxDatas_AfterUpdate()
Dim strSQLSF As String

strSQLSF = " SELECT * FROM T_ValAn "
strSQLSF = strSQLSF & " WHERE T_ValAn.Param = '" &
CbxParam & "' And "
strSQLSF = strSQLSF & " WHERE T_ValAn.IdCompon = " &
CbxIdCompon & " And "
' strSQLSF = strSQLSF & " T_ValAn.Param = '" &

CbxParam
& "' And "
strSQLSF = strSQLSF & " T_ValAnuais.Data = #" & Trim
(CbxDatas) & "#"

Me!SubF_HistoricValAn.LinkChildFields = ""
Me!SubF_HistoricValAn.LinkMasterFields = ""

Me!SubF_HistoricValAn.LinkChildFields
= "IdCompon;Param;Date"
Me!SubF_HistoricValAn.LinkMasterFields
= "IdCompon;Param;Dat"
Me.RecordSource = strSQLSF
Me.Requery

End Sub

If is possible I would like your help, please.


I would like to try to help, but since you do not provide

any
information about the values of cbxParam, cbxIdCompon, or

cbxDatas I
really have no idea. Please try running this code step by

step in
debug mode, and post the value of strSQLSF, and indicate

the datatype
(number, text, or date/time) of each of the fields.

Note that the word DATE is a reserved word, and is

dangerous to use as
a fieldname. Try using [Date] in the LinkChildFields. Is
T_ValAnuais.Data perhaps intended to be T_ValAnuais.

[Date] ?

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering Custom Forms After Additions Have Been Made To It? Elizabeth Contacts 1 August 11th, 2004 07:44 PM
Continous Form - Additions = Yes or No Tom Using Forms 4 July 28th, 2004 05:21 PM
Switchboard Menus Additions Do Not Appear DaOcean General Discussion 0 July 14th, 2004 03:38 PM
Changes or Additions to Address Book Bryan Jackson Outlook Express 1 June 14th, 2004 02:50 AM


All times are GMT +1. The time now is 12:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.