-
bumblebee
AskWoody PlusIt works!! Thank you Hans and Rudi for your patience and support. It is VERY much appreciated.
-
bumblebee
AskWoody PlusI’ve stripped out almost everything from the database. When you open the Form and press the first button ‘1. Calculate Price Each’ it should update the date/time stamp to the side of it, but it doesn’t. In this stripped down version I’ve removed the queries the button would have also executed as my problem lies with the date/time not changing.
-
bumblebee
AskWoody PlusI replaced Me with CodeContextObject.Recalc
When the button is pressed the macro now correctly runs each of my queries but at the end of this I get “Syntax error in update statement”.
Here is the code…
‘————————————————————
‘ getpriceeach
‘
‘————————————————————Function getpriceeach()
On Error GoTo getpriceeach_ErrDoCmd.SetWarnings True
‘ 1. Add order info
DoCmd.OpenQuery “1 – ADD ORDER INFO”, acViewNormal, acEdit‘ 1a. Group & sum
DoCmd.OpenQuery “1A – GROUP&SUM”, acViewNormal, acEdit‘ 2. Group & max
DoCmd.OpenQuery “2 – GROUP & MAX”, acViewNormal, acEdit‘ 3. Calculate price each
DoCmd.OpenQuery “3 – CALCULATE PRICE EACH”, acViewNormal, acEditDoCmd.SetWarnings True
Dim strSQL As String
strSQL = “UPDATE tblTimeStamp Set TimeStamp = Now()”
CurrentDb.Execute strSQL
CodeContextObject.Recalc
Exit Functiongetpriceeach_Exit:
Exit Functiongetpriceeach_Err:
MsgBox Error$
Resume getpriceeach_ExitEnd Function
-
bumblebee
AskWoody PlusNow I get “Compile Error Invalid use of Me keyword”.
-
bumblebee
AskWoody PlusEdited by HansV to replace Word doc with cropped version of the Word document it contained.
Oops! Ok….I’m a bit further forward now but am getting a compile error in the VB code for the button. Please see attached screenshot.
-
bumblebee
AskWoody PlusThe function found in the VBA module from the converted macro just shows as ‘Function getpriceeach() ‘. getpriceeach is the name of my macro. When I paste ‘getpriceeach()’ between the Sub and End Sub statements (for my button), I get ‘Compile Error Expected: =’.
-
bumblebee
AskWoody PlusThanks Rudi. Sorry if this is a dumb question but I’m getting unstuck on your last step when I have to click on the elipse button. Please clarify what sort of thing I should be typing and exactly where. Thanks.
-
bumblebee
AskWoody PlusThe On Click event procedure of the command button is already set to the name of my macro that runs a series of queries. Where should I put the code?
-
bumblebee
AskWoody PlusJanuary 24, 2008 at 4:29 pm in reply to: How do I get numbers to show with decimal places? (2002) #1094015Ok. Thanks for clarifying that. Appreciate your time.
-
bumblebee
AskWoody PlusJanuary 24, 2008 at 3:27 pm in reply to: How do I get numbers to show with decimal places? (2002) #1093998Thanks, that worked. Is there any other way of making this formatting happen during the query stage? I was hoping to have put my MTQ along with 12 other queries on a single button with a macro that would run the whole lot. Any ‘tweaking’ with a table after its creation would be a problem.
-
bumblebee
AskWoody PlusJanuary 24, 2008 at 2:24 pm in reply to: How do I get numbers to show with decimal places? (2002) #1093989The MTQ Format property of the field is already set to fixed.
-
bumblebee
AskWoody PlusJanuary 24, 2008 at 2:15 pm in reply to: How do I get numbers to show with decimal places? (2002) #1093984Ok. I seem to be a little closer. The resulting MTQ table now shows the prices but if its a whole number like ‘128.00’, this appears on my table like ‘128’. If the price is ‘6.50’ it shows on my table as ‘6.5’.How can I make sure the decimal point is always shown and with two digits after it? Many thanks.
-
bumblebee
AskWoody PlusJanuary 24, 2008 at 12:18 pm in reply to: How do I get numbers to show with decimal places? (2002) #1093978Tbl 1 contains stock balances for hundreds of parts.
Tbl 2 contains a list of part numbers that I’m interested in for a certain exercise.
Tbl 3 contains prices for each of the parts in tbl 2. The table containing two fields – PartNumber and Price. The data type of the ‘Price’ field is Number, Field Size Double, Format Fixed, Decimal Places Auto. The prices show correctly in this table (e.g. 125.85). I don’t need to see the currency symbol.
My make table query links tbl 1 part number to tbl 2 part number (join property 1). The fields I want to see in the table it produces come from tbl 1 as well as some new fields I create that will be populated later by several update queries. One of the new fields is ‘PriceEach’. I input this as ‘PriceEach: 0’. So initially when the MTQ is created, this field shows zeros and is identified as a data type of Number.When I later run an update query to take the price from tbl 3 and populate them in my MTQ (against the correct part numbers), the formating is all wrong. The prices are shown without any decimal point. Where am I going wrong?
-
bumblebee
AskWoody PlusJanuary 24, 2008 at 10:15 am in reply to: How do I get numbers to show with decimal places? (2002) #1093970I don’t think an append query can help me. I have data from multiple tables being updated into a single table that has been created by my MTQ. I will keep ‘playing’ and see what I come up with. Thanks anyway.
-
bumblebee
AskWoody PlusJanuary 23, 2008 at 5:45 pm in reply to: How do I get numbers to show with decimal places? (2002) #1093875Thanks for such a quick reply. Which table field show I be amending? The MTQ or the table the prices originates in?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Windows 7 ISO /Windows 10 ISO
by
ECWS
6 hours, 40 minutes ago -
No HP software folders
by
fpefpe
7 hours, 25 minutes ago -
Which antivirus apps and VPNs are the most secure in 2025?
by
B. Livingston
2 hours, 29 minutes ago -
Stay connected anywhere
by
Peter Deegan
12 hours, 47 minutes ago -
Copilot, under the table
by
Will Fastie
4 hours, 1 minute ago -
The Windows experience
by
Will Fastie
19 hours, 2 minutes ago -
A tale of two operating systems
by
Susan Bradley
9 hours, 58 minutes ago -
Microsoft : Resolving Blue Screen errors in Windows
by
Alex5723
1 day ago -
Where’s the cache today?
by
Up2you2
1 day, 15 hours ago -
Ascension says recent data breach affects over 430,000 patients
by
Nibbled To Death By Ducks
1 day, 8 hours ago -
Nintendo Switch 2 has a remote killing switch
by
Alex5723
8 hours, 47 minutes ago -
Blocking Search (on task bar) from going to web
by
HenryW
1 day, 16 hours ago -
Windows 10: Microsoft 365 Apps will be supported up to Oct. 10 2028
by
Alex5723
2 days, 8 hours ago -
Add or Remove “Ask Copilot” Context Menu in Windows 11 and 10
by
Alex5723
2 days, 9 hours ago -
regarding april update and may update
by
heybengbeng
2 days, 10 hours ago -
MS Passkey
by
pmruzicka
1 day, 12 hours ago -
Can’t make Opera my default browser
by
bmeacham
2 days, 18 hours ago -
*Some settings are managed by your organization
by
rlowe44
2 days, 4 hours ago -
Formatting of “Forward”ed e-mails
by
Scott Mills
2 days, 17 hours ago -
SmartSwitch PC Updates will only be supported through the MS Store Going Forward
by
PL1
3 days, 12 hours ago -
CISA warns of hackers targeting critical oil infrastructure
by
Nibbled To Death By Ducks
3 days, 21 hours ago -
AI slop
by
Susan Bradley
1 day, 15 hours ago -
Chrome : Using AI with Enhanced Protection mode
by
Alex5723
3 days, 23 hours ago -
Two blank icons
by
CR2
1 day, 7 hours ago -
Documents, Pictures, Desktop on OneDrive in Windows 11
by
ThePhoenix
1 day, 9 hours ago -
End of 10
by
Alex5723
4 days, 10 hours ago -
Single account cannot access printer’s automatic duplex functionality
by
Bruce
3 days, 8 hours ago -
test post
by
gtd12345
4 days, 16 hours ago -
Privacy and the Real ID
by
Susan Bradley
4 days, 6 hours ago -
MS-DEFCON 2: Deferring that upgrade
by
Susan Bradley
2 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.