Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...Thank you for the best reply I've ever had to a forum question - it's extremely comprehensive and legible and answers my query thoroughly..."

Geography

Where in the world do Tek-Tips members come from?
billheath (TechnicalUser)
13 Jul 12 5:51
I have a table that lists date, current price, and product symbol. I use a form to track pertinent data of each product. The only part that ever changes is the current price. When the product form is opened to a specific product, I use a DAO recordset to look up and post the current price on the form. F1 is the symbol field and f2 is the current price.
VBA code:

stksubSql = "select [F2] from [CPTbl] where [F1] = " & "'" & _
Me![Symbol] & "'"
Set rstCurrent = CurrentDb.OpenRecordset(stksubSql, dbOpenDynaset)
If rstCurrent.EOF <> True Then
rstCurrent.MoveLast

x = rstCurrent.Fields(0)
Me!Current_Val = x
End If
This works fine. However, when I try to run a report of all products, the current prices have not been updated unless I completely step through each form manually to force the code to run on each product. CPTbl is automatically linked to a price sheet from the manufacturer.

Is there a way in code to have all records updated manually. I have very little VBA experience and am not sure of where to start.

Thanks for your help!
Bill
dhookom (Programmer)
13 Jul 12 10:07
I understand you not knowing which forum to post in but please limit you question to a single forum. There is at least one reply in forum705: Microsoft: Access Modules (VBA Coding).

Duane
Hook'D on Access
MS Access MVP

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close