Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Access 2007


  • Please log in to reply

#16
Gauze

Gauze

    Member

  • Topic Starter
  • Member
  • PipPip
  • 41 posts
I don't have clients with last visits but not first visits, more like the other way around. clients that came only once. They have a first visit and so the last visit is never filled. Only the clients that had more than one visit have a last visit date. That is why I was looking for a code to automatically bring over the first date to the last visit column. The code you found works for this. I just don't think I can use it unless I were to rebuild the whole database. It seems to only work for new records. I'm not working with this database anymore at the moment so I don't need to worry about it. I'm just an extern here at this place and I thought that would be cool to get that working better. thanks very much for everything
  • 0

Advertisements


#17
dm27

dm27

    Member

  • Member
  • PipPipPip
  • 272 posts
hello Gauze,

That's ok and if you want to update the table for any records that has a first visit but no last visit you can use the below SQL code in an Update query. I don't have Access 2007 here, but I believe you can find the Update Query option in the Query tab- then use the SQL view to enter the code below.

As usual, test on a copy of your table

Change the column name and table name to match your info.

UPDATE your table name
SET table name.Lastvisit = table name.firstvisit
WHERE table name.Lastvisit is null

Best of luck with your externship...

dm
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP