Connecting Tech Pros Worldwide Help | Site Map

Read Data from Table

  #1  
Old April 3rd, 2009, 10:20 PM
Newbie
 
Join Date: Nov 2008
Posts: 26
Hi,

Have table with data ( like a,b,c,d in column 1), want to read data from table and put in text box in continuous form.

like tble name "tbltest" and textbox name "txtbox".

now want to read first data from table and put in text box, then read second one and put in text box .....so on unit finish data in table.

Try to write following code, but couldn't fiqure out ----" New in VBA"
Expand|Select|Wrap|Line Numbers
  1. Set db = CurrentDb()
  2. Set rsLoc = db.OpenRecordset("tbltest", DB_OPEN_TABLE)
  3. 'Loop through records
  4. rsLoc.MoveFirst
  5. While Not rsLoc.EOF
  6.  
  7. txtbox =
Thx

*Please check attachment*

http://bytes.com/topic/access/insigh...ox-help-please

Last edited by NeoPa; April 4th, 2009 at 11:23 AM. Reason: Please use the [CODE] tags provided
  #2  
Old April 3rd, 2009, 11:25 PM
DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494

re: Read Data from Table


Hi Shimul,

What you are trying to do is going to cause you problems. With continuous forms only the select record is the current one. Therefor if you step through a recordset to update one of the textbooks you will only be updating the current record over and over again. Can you provide some more details in what you are trying to accomplish and maybe we can offer some alternatives.

Last edited by DonRayner; April 3rd, 2009 at 11:25 PM. Reason: Must of forgot to type part of my sentence
  #3  
Old April 4th, 2009, 12:27 AM
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 2,973
Provided Answers: 11

re: Read Data from Table


You've inadvertently posted this in the "Insights" section of the Access forum! I'll move it now to the "Answers" section.

Linq ;0)>

Moderator
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to read data from the transport Connection Cintury answers 6 September 11th, 2007 01:07 AM
how to read data from a sheet in excel file tanilov@yahoo.it answers 1 December 6th, 2006 03:15 PM
Read data from database table row by row Ester answers 4 November 22nd, 2005 11:49 AM
Read data from database table row by row Ester answers 4 July 21st, 2005 04:00 PM