It sounds as if you have a textbox which contains a date. When you press a button you want to insert however many blank records into a table as there are days in the month for that date.
Here is some simple, not very elegant code to do that
ldDate = thisform.text2.value
lnMonth = MONTH(ldDate)
ldDate = ldDate - DAY(ldDate) + 1
DO WHILE lnMonth = MONTH(ldDate)
APPEND BLANK
ldDate = ldDate + 1
ENDDO
I also don't understand what you mean by "Dayname if the day is Friday."
All that has happened above is creating blank records. If any of the fields need specific values, you will have to put code for that where I indicated.
>hi ,
>i don't understand what you mean,
>but i need to insert at my thisform.text2.value ctod("01/01/2005")
>thanks.
>>Is the month you enter, always less than a year from now?
>>>hi,
>>>thank you,
>>>i try to do this as under ,it works as add 31 days,
>>>but i need to replace dayname if the day name is friday,
>>>and i want to add month(2) feb..to month(12),take care if thedays for every month is 31 , 30 or 29 or 28 if month is=2
>>>
>>>IF MONTH(thisform.text2.Value)=01
>>> FOR n=1 TO 31
>>> APPEND BLANK
>>> endfor
>>>endif
>>>
>>>>Hi Mohammed,
>>>>
>>>>I don't mean to be rude, but I don't understand what you want.
>>>>Do you want 31 blank records? If so, under what conditions.
>>>>Why do you mention Friday?
>>>>Can you give us a better explanation?
>>>>>hi all,
>>>>>
>>>>>i need help to insert 31 records at my table if month e.i =1,if day is friday insert(replace) at myfield rem friday
>>>>>as
>>>>>31 append blank
>>>>>thanks.