|
-
Dec 1st, 2006, 04:32 PM
#1
Thread Starter
Addicted Member
[RESOLVED] FlexGrid Format Cell's
Hi
I want to format the ComboBox text which placing over the FlexGrid
The result will show in FG2 cell in .Col 18 like that
dataincellxdataincellxdataincellxdataincellxdataincell
Where x is separates the cell data
If there is no data in any cell's then we want to make sure there is'nt tow xx behaind each other
VB Code:
Private Sub Command1_Click()
With FG2
.Col = 18
.Text = Combo6.Text & "x" & Combo7.Text & "x" & Combo9.Text & "x" & Combo10.Text & "x" & _
Combo14.Text & "x" & Combo15.Text & "x" & Combo17.Text & "x" & Combo18.Text & "x" & _
Combo23.Text & "x" & Combo24.Text & "x" & Combo26.Text & "x" & Combo27.Text & "x" & _
Combo31.Text & "x" & Combo32.Text & "x" & Combo34.Text & "x" & Combo35.Text
FG2.Text = Replace(FG2.Text, "xx", "x") ' If there is more then 2 xx it want work
' Also if i enter the data in any combo then i press the command
' then i clear the data and press the command it want work
End With
End Sub
What i miss
-
Dec 1st, 2006, 06:37 PM
#2
Re: FlexGrid Format Cell's
A quick loop will work
VB Code:
Do
If InStr(1, strTemp, "xx") = 0 Then Exit Do
strTemp = Replace(strTemp, "xx", "x")
Loop
-
Dec 1st, 2006, 11:12 PM
#3
Re: FlexGrid Format Cell's
instead you can change your code with the IIf statement like
VB Code:
.Col = 18
.Text =
IIf(Trim(Combo6.Text) = "", "", Combo6.Text & "x") & _
IIf(Trim(Combo7.Text) = "", "", Combo7.Text & "x") & _
IIf(Trim(Combo9.Text) = "", "", Combo9.Text & "x")
'...and so on
If an answer to your question has been helpful, then please, Rate it!
Have done Projects in Access and Member management systems using BioMetric devices, Smart cards and BarCodes.
-
Dec 2nd, 2006, 11:57 AM
#4
Thread Starter
Addicted Member
Re: FlexGrid Format Cell's
Thank's brucevde
ganeshmoorthy
Both working
Except that if i choose only 1 combo and click the command the format will be like that
Dataincellx
The x is only separates the data
The x not start befor the data and it will not be after the data
I will try work on it
Thank's
Last edited by jamal464; Dec 2nd, 2006 at 12:12 PM.
-
Dec 8th, 2006, 04:18 PM
#5
Thread Starter
Addicted Member
Re: FlexGrid Format Cell's
 Originally Posted by ganeshmoorthy
instead you can change your code with the IIf statement like
VB Code:
.Col = 18
.Text =
IIf(Trim(Combo6.Text) = "", "", Combo6.Text & "x") & _
IIf(Trim(Combo7.Text) = "", "", Combo7.Text & "x") & _
IIf(Trim(Combo9.Text) = "", "", Combo9.Text & "x")
'...and so on
I thought it was solved but i figure that the result for combo.text it will be all the same for all row's in .Col 18
I want each row got his own format shown in .Col 18
Last edited by jamal464; Dec 8th, 2006 at 04:23 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|