Ask Experts Questions for FREE Help!
Ask    ||    Answer
 
Advanced  
 

Ask QuestionsprogressAnswer QuestionsprogressBuild ReputationprogressBecome an Expert
 
Free Answers in 3 Easy Steps

Register Now
3 Steps

At Ask Me Help Desk you can ask questions in any topic and have them answered for free by our experts. To ask questions or participate in answering them you must register for a free account. By registering you will be able to:
  • Get free answers from experts in any of our 300+ topics.
  • Accept money for answers that you provide.
  • Communicate privately with other members (PM).
  • See fewer ads.

Home > Computers & Technology > Programming > Compiled Languages > Visual Basic   »   datareport1.show does not work

 
Thread Tools Search this Thread Display Modes
Question
 
 
#1  
Old Dec 11, 2007, 08:12 PM
irfan512
New Member
irfan512 is offline
 
Join Date: Dec 2007
Posts: 6
irfan512 See this member's comment history on his/her Profile page.
datareport1.show does not work

Dear Sir,

I have used following vb code for displaying particular staffno on screen but it does not work.

table = elect

vb code:

private sub command1_click()

dim stsql as string

stsql = "select * from elect where staffno=" & text1.text
data1.Recordsource = stsql
data1.refresh

datareport1.show

It is not working, please guide me with compelete codes.
Thanking you.

Reply With Quote
 
     

Answers
 
 
Old Dec 14, 2007, 04:43 PM   #2  
New Member
Gabriel is offline
 
Join Date: Jul 2005
Posts: 3
Gabriel See this member's comment history on his/her Profile page.
It might help if you gave the error you are receiving.

If the 666 is a string, you may need to use single quotes so the string ends up looking like:

select * from elect where staffno='666'
  Reply With Quote
 
     
 
 
Old Jan 3, 2008, 01:27 AM   #3  
New Member
yuffie is offline
 
Join Date: Dec 2007
Posts: 12
yuffie See this member's comment history on his/her Profile page.
maybe u could change the query to

stsql = "select * from elect where staffno = ' " & text1.text & " ' "

if the staffno data type is varchar

what is data1 and datareport1?
  Reply With Quote
 
     

Your Answer
Email me when someone replies to my answer
Join Login





Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

 
Similar Sponsors


Thread Tools
Show Printable Version Show Printable Version
Email this Page Email this Page

Similar Threads
Live in NH, work for MA company, if relocated to work from home, what about taxes?
(3 replies)
how does POS retail tills work, cash registers with touch screens how do they work?
(2 replies)
old show!
(1 replies)
how does POS retail tills work, cash registers with touch screens how do they work?
(2 replies)
how does POS retail tills work, cash registers with touch screens how do they work?
(0 replies)

Search this Thread

Advanced Search

Bookmarks

Sponsors



Copyright ©2003 - 2009, Ask Me Help Desk.
All times are GMT -8. The time now is 05:16 PM.