Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening form formula 2

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi,

Have a question of opening a form on a currency field.
I have used this on a number field ie:
DoCmd.Openform "form42c", , , "Chqno=" & "'" & Me.ChqNo & "'"
which will open a form and display all the info.

I would like to be able to click on a currency field and open all the currency amounts on a form or report to display the same amount.

Tbanks
 
Sorry you have not used that on a number field successfully.

Chqno=" & "'" & Me.ChqNo & "'"

This would resolve to
Chqno = '1234'
which would through an error. That would work for a text field. For a numeric field

Chqno = " & me.chqNo
which resolves to
Chqno = 1234
 
MajP

Thanks for that info.
How would you write the code so that it works on a currency field?

I tried this code;
DoCmd.Openform "form71a", , , BDr = " & Me.BDr"
on a currency field, but could not get it to work.
Could I have some help on this please.

Many thanks
 
HiDhookom,
Many thanks for your help. It worked great.
Would you be able to show me how to write the code so that this would work for date and time fields.

Many thanks
 
Code:
DoCmd.Openform "form71a", , , "[Datetime Field]=#" & Format(Me![Datetime control], "yyyy-mm-dd") & "#"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top