Connecting Tech Pros Worldwide Forums | Help | Site Map

Read Data from Table

Newbie
 
Join Date: Nov 2008
Posts: 26
#1: Apr 3 '09
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

DonRayner's Avatar
Expert
 
Join Date: Sep 2008
Location: Canada
Posts: 494
#2: Apr 3 '09

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.
missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,000
#3: Apr 4 '09

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