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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |