Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Table.Filter


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-13-2007, 04:16 PM
Newbie
 
Join Date: May 2007
Posts: 2
Default Table.Filter

With the Table.Filter command is it possible to use variables as the Column and Arguement as I can only make this function work with fixed values.
Reply With Quote
  #2 (permalink)  
Old 05-13-2007, 05:38 PM
specci48's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: Germany
Posts: 672
Arrow

Hi Phil,

let's take the following Table

Table1.AddCol(cNumber, "Number", 50)
Table1.AddCol(cString, "Value1", 50)
Table1.AddCol(cString, "Value2", 50)

Table1.AddRow(1, "A1", "red")
Table1.AddRow(1, "A2", "green")
Table1.AddRow(2, "A2", "blue")
Table1.AddRow(2, "A2", "white")
Table1.AddRow(2, "A4", "black")

and these two variables

arg1 = 2
arg2 = "A2"

For a column with cNumber format we could code this filter

Table1.Filter("Number = " & arg1)

Result: the rows with "blue", "black" and "white".

To code a filter with a column of cString format you have to add some ' around the variables like

Table1.Filter("Value1 = '" & arg2 & "'")

Result: the rows with "green", "blue" and white.


specci48
Reply With Quote
  #3 (permalink)  
Old 05-16-2007, 10:35 PM
Newbie
 
Join Date: May 2007
Posts: 2
Default

Thanks specci48 that explained the syntax ( I've only been using BASIC4PPC a couple of days)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Retrieve table filter from the filtered table? LineCutter Questions & Help Needed 1 09-08-2008 07:20 AM
Table.filter problems J12345T Questions & Help Needed 1 08-19-2008 08:19 AM
Filter a table on keypresses Offbeatmammal Questions & Help Needed 5 06-01-2008 08:29 PM
Table filter (AND & OR) LineCutter Questions & Help Needed 1 08-24-2007 02:29 PM
save filter of a table manu Questions & Help Needed 4 08-23-2007 04:46 PM


All times are GMT. The time now is 07:31 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0