B
Balmora via AccessMonster.com
Well, nothing works. i will try too explan it ai simple as i can lets say i
have one table named MyTable and in my table i have only mmmmyyyyID i want to
call it that way because i want monthe in full and year in 4 digits so it
looks like May 2008 lets say i guess i can always right the first id by hand
so it can start by their and i was thinking that maybe i can put the vba code
in the next record command button that i coded this way
Private Sub cmdNewRec_Click()
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
End Sub
as you can see i put Me.AllowAdditions = True because this is the only button
that can add a new record
so to start off from their i was wondering if i
should create a table called month and have like Id and Month and insert all
12 month of the year and then some how have the code in the cmdNewRec button
go thow all the 12 records to display the month and when it gets to the end
it would increment the year by one and then start over. maby use some format()
and some Dlookup in the code i realy dont know but this is how i see it.
do you think its possible. to be used as a primary key i know its not the
best way to go but this is what i need. i see this as a realy good learning
experience. thank you in advance for all your help.
oh!
i thought this over and i guess i can keep a autonumber for the primery key i
realy just need the month and year to increment automaticaly so a month is
never skiped because i then make a time stamp of it for some filtering.
i
know im making some happy by not using it for a primery key
hope to here
from you all soon
have one table named MyTable and in my table i have only mmmmyyyyID i want to
call it that way because i want monthe in full and year in 4 digits so it
looks like May 2008 lets say i guess i can always right the first id by hand
so it can start by their and i was thinking that maybe i can put the vba code
in the next record command button that i coded this way
Private Sub cmdNewRec_Click()
Me.AllowAdditions = True
DoCmd.GoToRecord , , acNewRec
End Sub
as you can see i put Me.AllowAdditions = True because this is the only button
that can add a new record
should create a table called month and have like Id and Month and insert all
12 month of the year and then some how have the code in the cmdNewRec button
go thow all the 12 records to display the month and when it gets to the end
it would increment the year by one and then start over. maby use some format()
and some Dlookup in the code i realy dont know but this is how i see it.
do you think its possible. to be used as a primary key i know its not the
best way to go but this is what i need. i see this as a realy good learning
experience. thank you in advance for all your help.
oh!
i thought this over and i guess i can keep a autonumber for the primery key i
realy just need the month and year to increment automaticaly so a month is
never skiped because i then make a time stamp of it for some filtering.
know im making some happy by not using it for a primery key
from you all soon