msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How can I get the value incorrect

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax
Author Message
simon



Joined: 04 Oct 2007
Posts: 2

PostPosted: Tue Jul 11, 2006 12:59 am    Post subject: How can I get the value incorrect Reply with quote

Hello all I am writing a program about the database.
The part of program as follow
For i = 0 To 3
str_detalle = "rs_editfac!mem_DETALLE" & (i )
Text2(i) = str_detalle
Next i

In the table ,there are such as
rs_editfac!mem_DETALLE1
rs_editfac!mem_DETALLE2
rs_editfac!mem_DETALLE3.....
those fields , I want put the value of those field to the textboxs,such as
text2(0)=rs_editfac!mem_DETALLE1
text2(1)=rs_editfac!mem_DETALLE2
text2(2)=rs_editfac!mem_DETALLE3
......
I don't know how can I write this.
Have anyone can help me?
Thank you very much!
Best regards,

Simon

Archived from group: microsoft>public>vb>syntax
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1325

PostPosted: Mon Jul 10, 2006 5:02 pm    Post subject: Re: How can I get the value incorrect Reply with quote

"simon" wrote in message@TK2MSFTNGP04.phx.gbl
> Hello all, I am writing a program about the database.
> The part of program as follow
> For i = 0 To 3
> str_detalle = "rs_editfac!mem_DETALLE" & (i )
> Text2(i) = str_detalle
> Next i
>
> In the table ,there are such as
> rs_editfac!mem_DETALLE1
> rs_editfac!mem_DETALLE2
> rs_editfac!mem_DETALLE3.....
> those fields , I want put the value of those field to the
> textboxs,such as text2(0)=rs_editfac!mem_DETALLE1
> text2(1)=rs_editfac!mem_DETALLE2
> text2(2)=rs_editfac!mem_DETALLE3

If I understand the question those last 3 lines of code above should work or
use something like

For i = 0 To 3
Text2(i) = rs_edit.fields("mem_DETALLE" & CStr(i )).Value
Next i

FYI, the ! syntax is general considered to be poorer style than using the
Fields collection.

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Back to top
View user's profile Send private message
Bob O`Bob



Joined: 04 Oct 2007
Posts: 1456

PostPosted: Mon Jul 10, 2006 9:23 pm    Post subject: Re: How can I get the value incorrect Reply with quote

Bob Butler wrote:

>
> FYI, the ! syntax is general considered to be poorer style than using the
> Fields collection.
>


But NOWHERE NEAR as poor a practice as is using "default properties"
such as of textbox controls
Back to top
View user's profile Send private message
Bob Butler



Joined: 04 Oct 2007
Posts: 1325

PostPosted: Mon Jul 10, 2006 10:16 pm    Post subject: Re: How can I get the value incorrect Reply with quote

"Bob O`Bob" wrote in message@TK2MSFTNGP05.phx.gbl
> Bob Butler wrote:
>
>>
>> FYI, the ! syntax is general considered to be poorer style than
>> using the Fields collection.
>>
>
> But NOWHERE NEAR as poor a practice as is using "default properties"
> such as of textbox controls

No real argument here except that I see the ! syntax as a kind of subset of
that same issue since ! effectively just means "call the default property
passing the following string as an argument".

--
Reply to the group so all can participate
VB.Net: "Fool me once..."
Back to top
View user's profile Send private message
simon



Joined: 04 Oct 2007
Posts: 2

PostPosted: Tue Jul 11, 2006 9:05 pm    Post subject: OK! ALL IS WORKING, THANK ALL. GRACIAS!!! Reply with quote

Bob Butler 写道:
> "Bob O`Bob" wrote in message
> @TK2MSFTNGP05.phx.gbl
>> Bob Butler wrote:
>>
>>> FYI, the ! syntax is general considered to be poorer style than
>>> using the Fields collection.
>>>
>> But NOWHERE NEAR as poor a practice as is using "default properties"
>> such as of textbox controls
>
> No real argument here except that I see the ! syntax as a kind of subset of
> that same issue since ! effectively just means "call the default property
> passing the following string as an argument".
>

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
HELP: "The parameter is incorrect" Hi I have created a OCX which initializes correctly when I use the SnapIn Designer to create the nodes and then specify the The problem I have occurrs when I create nodes dynamically and then need specify the resultview using the progid.

Version Incorrect in DXDiag I installed DX 9c on my PC and it looks like it install correctly but when I check the DXDiag It shows I still have DX 8. Anyone know how to fix this or why this would happen?

LoadLibrary fails with " incorrect format" error when regist I suspect I may have hit some physical limit of VB DLL's in Win9x. I have a 8MB Visual Basic dll that works fine under W2K and XP but will not register under 95 and 98. I can actually build the DLL in Win98 without any errors, but when I attempt to regi

Incorrect memory information Hello, Does anyone know why the following code yields incorrect memory info? On a 1GB RAM system it reports 1,021MB, seems to be missing 3MB. **** Private Type LARGE_INTEGER LowPart As Long HighPart As Long End Type Private Type dwLength As

FindWindow returns incorrect value for OpusApp (I think) My client's MS Access application, developed in Access2k, has now stopped working correctly following an update to Access 2007. Specifically, attempting to automate Word for a mail merge operation. In my old code I had a block* where I checked to see if W
Post new topic   Reply to topic    msvisual.com Forum Index -> VB Syntax All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group