Re: Update fields !

From: Dan Artuso (dartuso_at_NOSPAMpagepearls.com)
Date: 12/03/04


Date: Fri, 3 Dec 2004 14:17:16 -0500

Hi,
Sorry, I think I misunderstood what you wanted.
You cannot do this by entering data directly into tables, you have
to use forms.

-- 
HTH
-------
Dan Artuso, MVP
"Dan Artuso" <dartuso@NSpagepearls.com> wrote in message news:eR01DNT2EHA.3908@TK2MSFTNGP12.phx.gbl...
> Hi,
> Pretty much anything is possible, you just have to code it.
> In this case you would use a SQL Update statement and execute it in code.
> The values for the fields you are updating are taken from the controls on the form.
>
> I'll give you the general idea. In this sample, there are two controls on the form that have dates in them.
>
> Dim strSql as String
>
> strSql = "Update yourTable Set dateField1 = #" & Me.control1 & _
>             "#, dateField2 = #" & Me.control2 & "#"
> CurrentDb.Execute strSql, dbFailOnError
>
> Dates must be delimited with #
> Strings with quotes '
> Numbers need no delimiters
>
> For dates, if your format is not mm/dd/yyyy you might want to use the Format function
> to put them in this format, otherwise Jet gets confused as to which part is the month and which is the day.
>
> You can also run into trouble with strings if they have embeded quotes within ("Dan's Bar & Grill")
> but that's a whole other topic.
>
> --
> HTH
> Dan Artuso, Access MVP
>
>
> "peter junker" <junker1@aliceposta.it> wrote in message news:NDVrd.248844$b5.12160131@news3.tin.it...
> > Hello - if id like to update fields in a table, without using a form, is
> > this possible
> > automaticly after i left a field.
> > for example - i put in the coustomer ID - after i did update the field, id
> > like to update based on the coustomer ID - all the dates directly in this
> > table ( the fields ) , not in the form!
> >
> > thanks peter
> >
> >
>
>


Relevant Pages

  • Re: How to format programmatically
    ... Dan Artuso, MVP ... the only formatting function that I now is Format ...
    (microsoft.public.access.formscoding)
  • Re: String Concatenation????
    ... you are confusing Format with FormatMessage. ... FormatMessage uses the fancier strings you show below. ... Format and sprintf are effectively the same operation. ... MVP Tips: http://www.flounder.com/mvp_tips.htm ...
    (microsoft.public.vc.mfc)
  • Re: weekday Name Function
    ... format to display it. ... So 1 would display as Sunday. ... Dan Artuso, MVP ...
    (microsoft.public.access.queries)
  • Re: Will Templates/Documents Created In Word X For Mac Function In Word 08
    ... Tiger is a little preoccupied hunting that elusive fifth green jacket ... That is about a quarter the size of the old .doc format, ... Between this site and the associated MVP site, I feel like a guy who ... I'll either buy that new Mac and wait for the MS Service Pack 12.1 as you ...
    (microsoft.public.mac.office.word)
  • Re: Combo Box Display Missing After Office 2003 Service Pack 3
    ... Further testing by an MVP confirms that the problem does occur with text ... SELECT FieldX & "" FROM TableName. ... Let us know if this workaround gives you back the formatting display ... Now go to design view on TableX and change the format property of FieldX ...
    (microsoft.public.access.modulesdaovba)