A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Table Value



 
 
Thread Tools Display Modes
  #1  
Old August 25th, 2004, 05:14 AM
PCC
external usenet poster
 
Posts: n/a
Default Table Value

I am trying to write an if statement to open a form based
on a value in a table. In other words if rates = 0 then
open form1 else open form2. Is there a way to write that
in access.

Thanks

  #2  
Old August 25th, 2004, 09:08 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

Private Sub cmdView_Click()
Dim strDoc As String

If Rates = 0 Then
strDoc = "Form1"
Else
strDoc = "Form2"
End If

DoCmd.OpenForm strDoc
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"PCC" wrote in message
...
I am trying to write an if statement to open a form based
on a value in a table. In other words if rates = 0 then
open form1 else open form2. Is there a way to write that
in access.

Thanks



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Row source of table referring to same table? Noozer Running & Setting Up Queries 2 August 12th, 2004 08:29 PM
Table Error Message Di New Users 2 June 30th, 2004 07:57 AM
Name not showing ID is René Setting Up & Running Reports 11 June 29th, 2004 01:40 AM
Image Control Table John Gavin General Discussion 3 June 28th, 2004 04:21 AM
HELP: Update 1 table with calculated fields from another table Samora Running & Setting Up Queries 0 May 23rd, 2004 05:16 PM


All times are GMT +1. The time now is 12:18 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.