Group:  Microsoft Access ยป microsoft.public.access.modulesdaovba.ado
Thread: Call Dates from a Table

Geek News

Call Dates from a Table
PR 12/29/2008 4:11:01 PM
I am trying to set up a routine that allows me to set dates when a form is
open up...

I have a table called tbl_ROD, which has 2 fileds held in it AGA_ROD and
AWSA_ROD, what I would like to do is set this date on the form when update to
one of these dates...

Can anyone help me...
Re: Call Dates from a Table
"Jeanette Cunningham" <nnn[ at ]discussions.microsoft.com> 12/30/2008 11:52:51 AM
Hi PR,

If you are asking how to set a default date for a date text box when the
form opens, you can do it like this.

In the load event of the form:

Me.[NameOfDateControl].DefaultValue = "#" & DLookup("{AGA_ROD]", 'tbl_ROD")
& "#"


When the form opens, the date in the text box will be the value of the date
in field AGA_ROD in the table.
Note I am assuming that tbl_ROD has only one record, and that there is only
one possible value for AGA_ROD.


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia


"PR" <PR[ at ]discussions.microsoft.com> wrote in message
news:8EA0AF95-7972-480E-B736-B90B3EE1A531[ at ]microsoft.com...
[Quoted Text]
>I am trying to set up a routine that allows me to set dates when a form is
> open up...
>
> I have a table called tbl_ROD, which has 2 fileds held in it AGA_ROD and
> AWSA_ROD, what I would like to do is set this date on the form when update
> to
> one of these dates...
>
> Can anyone help me...


Re: Call Dates from a Table
PR 12/30/2008 2:37:06 PM
Jeanetta,
there are two fields in the table called "AGA_ROD and AWSA_ROD" there are
only one value in each... is this ok?

PR

"Jeanette Cunningham" wrote:

[Quoted Text]
> Hi PR,
>
> If you are asking how to set a default date for a date text box when the
> form opens, you can do it like this.
>
> In the load event of the form:
>
> Me.[NameOfDateControl].DefaultValue = "#" & DLookup("{AGA_ROD]", 'tbl_ROD")
> & "#"
>
>
> When the form opens, the date in the text box will be the value of the date
> in field AGA_ROD in the table.
> Note I am assuming that tbl_ROD has only one record, and that there is only
> one possible value for AGA_ROD.
>
>
> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>
>
> "PR" <PR[ at ]discussions.microsoft.com> wrote in message
> news:8EA0AF95-7972-480E-B736-B90B3EE1A531[ at ]microsoft.com...
> >I am trying to set up a routine that allows me to set dates when a form is
> > open up...
> >
> > I have a table called tbl_ROD, which has 2 fileds held in it AGA_ROD and
> > AWSA_ROD, what I would like to do is set this date on the form when update
> > to
> > one of these dates...
> >
> > Can anyone help me...
>
>
>
Re: Call Dates from a Table
"Jeanette Cunningham" <nnn[ at ]discussions.microsoft.com> 12/31/2008 7:09:52 AM
Yes, this is OK.
I am assuming that AGA_ROD contains a date when you open the table in data
sheet view, and a similar thing for AWSA_ROD.



Jeanette Cunningham MS Access MVP -- Melbourne Victoria AustraliaIs each
value a date?


"PR" <PR[ at ]discussions.microsoft.com> wrote in message
news:6B243623-5084-4C01-99D4-E6313D5989C9[ at ]microsoft.com...
[Quoted Text]
> Jeanetta,
> there are two fields in the table called "AGA_ROD and AWSA_ROD" there are
> only one value in each... is this ok?
>
> PR
>
> "Jeanette Cunningham" wrote:
>
>> Hi PR,
>>
>> If you are asking how to set a default date for a date text box when the
>> form opens, you can do it like this.
>>
>> In the load event of the form:
>>
>> Me.[NameOfDateControl].DefaultValue = "#" & DLookup("{AGA_ROD]",
>> 'tbl_ROD")
>> & "#"
>>
>>
>> When the form opens, the date in the text box will be the value of the
>> date
>> in field AGA_ROD in the table.
>> Note I am assuming that tbl_ROD has only one record, and that there is
>> only
>> one possible value for AGA_ROD.
>>
>>
>> Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
>>
>>
>> "PR" <PR[ at ]discussions.microsoft.com> wrote in message
>> news:8EA0AF95-7972-480E-B736-B90B3EE1A531[ at ]microsoft.com...
>> >I am trying to set up a routine that allows me to set dates when a form
>> >is
>> > open up...
>> >
>> > I have a table called tbl_ROD, which has 2 fileds held in it AGA_ROD
>> > and
>> > AWSA_ROD, what I would like to do is set this date on the form when
>> > update
>> > to
>> > one of these dates...
>> >
>> > Can anyone help me...
>>
>>
>>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net