473,473 Members | 2,021 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

move next commands

140 New Member
HI all

one sequence has many panels. when i select combo it displays all the fields but panel has more rows. i want to view that also. how to do that?
move next and previous commds are there but not working.

pls help me with coding


here goes my coding

Expand|Select|Wrap|Line Numbers
  1. Private Sub sequcombo_Click()
  2.  
  3.  myconnection
  4.  
  5.  myquery = sequcombo.Text
  6.  
  7.  Call rLOAD
  8.  Do While storyboard!sequence <> myquery
  9.  storyboard.MoveNext
  10.  If storyboard!sequence = myquery Then
  11.  scenecombo.Text = storyboard!scenes 'sceneid depends on the table(sequence)
  12.  
  13.  Call PanelCOUNT
  14.  panel_txt.Text = storyboard!Panel
  15.  action_txt.Text = storyboard!Action
  16.  dialogue_txt.Text = storyboard!dialogue
  17. 'Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
  18.  Image1.Picture = LoadPicture(storyboard!Filename) 'this produce sometimes in frame else error whileloading
  19.  noofpanel.Text = storyboard.RecordCount 'panelcount not displaying exact count of particular sequence
  20.  End If
  21.  Loop
  22.  
  23.  accdb = "SELECT DISTINCT sequence FROM sequence WHERE seqid = '" & myquery & "' "
  24. 'Load SQL query into a variable
  25.  
  26. Set storyboard = CON.Execute(accdb, adOpenStatic)
  27. End Sub
thanks in advance
Feb 13 '07 #1
55 3550
willakawill
1,646 Top Contributor
How many more rows do you want to view?
Feb 15 '07 #2
indhu
140 New Member
How many more rows do you want to view?
(panel)row is going to be indefinite in number.
seq
SW001 A
B
C
D these rows i want to display.

Expand|Select|Wrap|Line Numbers
  1. Sub rLOAD()
  2. Set storyboard = New ADODB.Recordset
  3. ' Open Recordset
  4. If CON.State = 1 Then
  5.     MsgBox "Connection is opened"
  6. Else
  7.     MsgBox "Connection is not opened"
  8. End If
  9. storyboard.Open "SELECT scenes, sequence, panel, filename, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'", CON, adOpenKeyset, adLockReadOnly
  10. End Sub 
when i click next button it shows 2 recordcount of that scene but not moving.
Feb 16 '07 #3
indhu
140 New Member
(panel)row is going to be indefinite in number.
seq
SW001 A
B
C
D these rows i want to display.

Expand|Select|Wrap|Line Numbers
  1. Sub rLOAD()
  2. Set storyboard = New ADODB.Recordset
  3. ' Open Recordset
  4. If CON.State = 1 Then
  5.     MsgBox "Connection is opened"
  6. Else
  7.     MsgBox "Connection is not opened"
  8. End If
  9. storyboard.Open "SELECT scenes, sequence, panel, filename, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'", CON, adOpenKeyset, adLockReadOnly
  10. End Sub 
when i click next button it shows 2 recordcount of that scene but not moving.

whatz up? no one is there to help me.
Feb 19 '07 #4
Killer42
8,435 Recognized Expert Expert
whatz up? no one is there to help me.
Don't be too impatient. The experts on this site are all volunteers, who have to find the time to help out here - it's not a paid job or anything. We are a little short on VB experts right now, due to illnesses and other commitments.

I'm sure willakawill will get back to you ASAP.

(Also, keep in mind that we live in various timezones).
Feb 19 '07 #5
willakawill
1,646 Top Contributor
Don't be too impatient. The experts on this site are all volunteers, who have to find the time to help out here - it's not a paid job or anything. We are a little short on VB experts right now, due to illnesses and other commitments.

I'm sure willakawill will get back to you ASAP.

(Also, keep in mind that we live in various timezones).
Au contraire. I am not too willing to continually work out an entire app for someone who always posts work everyone else has done for him not understanding it himself. Makes for a long drawn out botomless pit of suggestions
Feb 19 '07 #6
indhu
140 New Member
Au contraire. I am not too willing to continually work out an entire app for someone who always posts work everyone else has done for him not understanding it himself. Makes for a long drawn out botomless pit of suggestions
sorry for that.

so far i ve posted only 20 post in Vb. Rest of the post to MS access. Am very new to VB. thats y am asking such a question and suggestion form u guys.

thanks for the cooperation frm u guys.

good bye.
Feb 20 '07 #7
hariharanmca
1,977 Top Contributor
HI all

one sequence has many panels. when i select combo it displays all the fields but panel has more rows. i want to view that also. how to do that?
move next and previous commds are there but not working.

pls help me with coding


here goes my coding

Expand|Select|Wrap|Line Numbers
  1. Private Sub sequcombo_Click()
  2.  
  3.  myconnection
  4.  
  5.  myquery = sequcombo.Text
  6.  
  7.  Call rLOAD
  8.  Do While storyboard!sequence <> myquery
  9.  storyboard.MoveNext
  10.  If storyboard!sequence = myquery Then
  11.  scenecombo.Text = storyboard!scenes 'sceneid depends on the table(sequence)
  12.  
  13.  Call PanelCOUNT
  14.  panel_txt.Text = storyboard!Panel
  15.  action_txt.Text = storyboard!Action
  16.  dialogue_txt.Text = storyboard!dialogue
  17. 'Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
  18.  Image1.Picture = LoadPicture(storyboard!Filename) 'this produce sometimes in frame else error whileloading
  19.  noofpanel.Text = storyboard.RecordCount 'panelcount not displaying exact count of particular sequence
  20.  End If
  21.  Loop
  22.  
  23. accdb = "SELECT DISTINCT sequence FROM sequence WHERE seqid = '" & myquery & "' "
  24. 'Load SQL query into a variable
  25.  
  26. Set storyboard = CON.Execute(accdb, adOpenStatic)
  27. End Sub
thanks in advance


You are coded storyboard.MoveNext at the begining of the while loop so it will move to the second record then it will assigen the values
Feb 20 '07 #8
hariharanmca
1,977 Top Contributor
You are coded storyboard.MoveNext at the begining of the while loop so it will move to the second record then it will assigen the values
i think this qry will select two record then its showing the second record
Feb 20 '07 #9
hariharanmca
1,977 Top Contributor
whatz up? no one is there to help me.
This is not an answer bank that you can post your question and get answer, this is discussion group that will discus on the questions.

No one is expert to answer; every one is experts to discus


Be Cool Baby to post your QA's
Feb 20 '07 #10
indhu
140 New Member
This is not an answer bank that you can post your question and get answer, this is discussion group that will discus on the questions.

No one is expert to answer; every one is experts to discus


Be Cool Baby to post your QA's
sorry,

the way she said........k

anyway mine is working.

Private Sub cmdNext_Click()

Expand|Select|Wrap|Line Numbers
  1. Call resLOAD
  2. MsgBox storyboard.RecordCount
  3.  While Not storyboard.EOF
  4.   Call dataFill
  5.  storyboard.MoveNext
  6.  'msgbox "next REC"
  7.  Wend
  8.  
  9.  End Sub
but its going to first and last records, not going by order. 1,2,3. y it is moving like tht if i add msgbox "next" moving but its not stop in that rec becos of while loop. any idea abt this.
Feb 20 '07 #11
hariharanmca
1,977 Top Contributor
sorry,

the way she said........k

anyway mine is working.

Private Sub cmdNext_Click()

Expand|Select|Wrap|Line Numbers
  1. Call resLOAD
  2. MsgBox storyboard.RecordCount
  3.  While Not storyboard.EOF
  4.   Call dataFill
  5.  storyboard.MoveNext
  6.  'msgbox "next REC"
  7.  Wend
  8.  
  9.  End Sub
but its going to first and last records, not going by order. 1,2,3. y it is moving like tht if i add msgbox "next" moving but its not stop in that rec becos of while loop. any idea abt this.

did you use Order by in qry
Feb 20 '07 #12
hariharanmca
1,977 Top Contributor
sorry,

the way she said........k

anyway mine is working.

Private Sub cmdNext_Click()

Expand|Select|Wrap|Line Numbers
  1. Call resLOAD
  2. MsgBox storyboard.RecordCount
  3.  While Not storyboard.EOF
  4.   Call dataFill
  5.  storyboard.MoveNext
  6.  'msgbox "next REC"
  7.  Wend
  8.  
  9.  End Sub
but its going to first and last records, not going by order. 1,2,3. y it is moving like tht if i add msgbox "next" moving but its not stop in that rec becos of while loop. any idea abt this.

remove that while loop or Movenext inside that while loop
Feb 20 '07 #13
indhu
140 New Member
did you use Order by in qry
no,
storyboard.Open "SELECT xyz, sc1, image, ABCl, atn, dge FROM xyztbl WHERE sc1 = '" & sc1combo.Text & "'", CON, adOpenStatic, adLockReadOnly
Feb 20 '07 #14
hariharanmca
1,977 Top Contributor
no,
storyboard.Open "SELECT xyz, sc1, image, ABCl, atn, dge FROM xyztbl WHERE sc1 = '" & sc1combo.Text & "'", CON, adOpenStatic, adLockReadOnly
i think u have to remove while
Feb 20 '07 #15
indhu
140 New Member
i think u have to remove while
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdNext_Click()
  2.  
  3. Call rLOAD
  4.  
  5. MsgBox storyboard.RecordCount
  6. If Not storyboard.EOF Then
  7. storyboard.MoveNext
  8. Call Fill
  9. end if
  10. End sub
i tried this. its moving only 2 records not going to last rec.
Feb 20 '07 #16
hariharanmca
1,977 Top Contributor
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdNext_Click()
  2.  
  3. Call rLOAD
  4.  
  5. MsgBox storyboard.RecordCount
  6. If Not storyboard.EOF Then
  7. storyboard.MoveNext
  8. Call Fill
  9. end if
  10. End sub
i tried this. its moving only 2 records not going to last rec.
accdb= your qry
Press ctrl+G it will open the immediate window there type

? accdb
it will return the qry value

copy that value and paste in MSAccess qry editor then run it I think it will return two record
Feb 20 '07 #17
indhu
140 New Member
accdb= your qry
Press ctrl+G it will open the immediate window there type

? accdb
it will return the qry value

copy that value and paste in MSAccess qry editor then run it I think it will return two record
accdb = "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'"

?accdb

i tried it in immediate window not returning anything

tbl has 3 rec for tht id Hari,
Feb 20 '07 #18
hariharanmca
1,977 Top Contributor
accdb = "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'"

?accdb

i tried it in immediate window not returning anything

tbl has 3 rec for tht id Hari,

what is in Call dataFill

Ok, Post the complete function
and
you have keep breakpoint after
accdb = "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'"


line

then use that window
Feb 20 '07 #19
indhu
140 New Member
what is in Call dataFill

Ok, Post the complete function
and
you have keep breakpoint after
accdb = "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'"


line

then use that window
Sub Fill()

secombo = storyboard!seq1
sc1combo = storyboard!sc1
pan_txt.Text = storyboard!Pan
Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
act_txt.Text = storyboard!Act
dial_txt.Text = storyboard!dial
End Sub
Feb 20 '07 #20
hariharanmca
1,977 Top Contributor
Sub Fill()

secombo = storyboard!seq1
sc1combo = storyboard!sc1
pan_txt.Text = storyboard!Pan
Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
act_txt.Text = storyboard!Act
dial_txt.Text = storyboard!dial
End Sub

you are calling dataFill

and detail code about function and calling function
Feb 20 '07 #21
indhu
140 New Member
you are calling dataFill

and detail code about function and calling function
Expand|Select|Wrap|Line Numbers
  1. Sub rLOAD()
  2.  
  3. Set storyboard = New ADODB.Recordset
  4. ' Open Recordset
  5. If CON.State = 1 Then
  6.     MsgBox "Connection is opened"
  7. Else
  8.     MsgBox "Connection is not opened"
  9. End If
  10.  
  11. storyboard.Open "SELECT seq, sc1, images, pan, act, dial FROM  xyzTBL WHERE sc1 = '" & sc1combo.Text & "'", CON, adOpenStatic, adLockReadOnly

these 2 procedure only am using in cmdnext
Feb 20 '07 #22
hariharanmca
1,977 Top Contributor
Expand|Select|Wrap|Line Numbers
  1. Sub rLOAD()
  2.  
  3. Set storyboard = New ADODB.Recordset
  4. ' Open Recordset
  5. If CON.State = 1 Then
  6.     MsgBox "Connection is opened"
  7. Else
  8.     MsgBox "Connection is not opened"
  9. End If
  10.  
  11. storyboard.Open "SELECT seq, sc1, images, pan, act, dial FROM  xyzTBL WHERE sc1 = '" & sc1combo.Text & "'", CON, adOpenStatic, adLockReadOnly

these 2 procedure only am using in cmdnext

because of this code this is not moving next

1 Set storyboard = New ADODB.Recordset 'storyboard having New Instance
2 storyboard.Open "SELECT seq, sc1, images, pan, act, dial FROM xyzTBL WHERE sc1 = '" & sc1combo.Text & "'", CON, adOpenStatic, adLockReadOnly

' at the every click of nextCommandbutton the record set open again
Feb 20 '07 #23
indhu
140 New Member
because of this code this is not moving next

1 Set storyboard = New ADODB.Recordset 'storyboard having New Instance
2 storyboard.Open "SELECT seq, sc1, images, pan, act, dial FROM xyzTBL WHERE sc1 = '" & sc1combo.Text & "'", CON, adOpenStatic, adLockReadOnly

' at the every click of nextCommandbutton the record set open again
what i ve to do for this.
i ve commented recordset line, 2 line declared as accdb= that query.
but now its giving error in sc1comboclick_event
runtime error item cannot be found in collection or ordinal name.
Feb 20 '07 #24
hariharanmca
1,977 Top Contributor
what i ve to do for this.
i ve commented recordset line, 2 line declared as accdb= that query.
but now its giving error in sc1comboclick_event
runtime error item cannot be found in collection or ordinal name.
no, you have to give those lines but not here like

move next,move prev,move last,move first because these are the code execute after the record set open once. so you should not give here.

give in form load (but its not the correct way).
Feb 20 '07 #25
indhu
140 New Member
no, you have to give those lines but not here like

move next,move prev,move last,move first because these are the code execute after the record set open once. so you should not give here.

give in form load (but its not the correct way).
hey its working, i didn't set recordset to execute. thaty its given that error. but y my record count is showing -1
Feb 20 '07 #26
hariharanmca
1,977 Top Contributor
hey its working, i didn't set recordset to execute. thaty its given that error. but y my record count is showing -1

because of cursor type and lock type
Feb 20 '07 #27
indhu
140 New Member
hey its working, i didn't set recordset to execute. thaty its given that error. but y my record count is showing -1
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3. Set CON = New ADODB.Connection
  4. CON.CursorLocation = adUseClient
  5.  
  6. myconnection
  7.  
  8. Call tblLOAD
  9. projecttxt.Text = storyboard!project
  10. 'episode.Text = storyboard!episode
  11.  
  12. storyboard.MoveFirst
  13.  
  14. Call sceneLOAD
  15.  
  16. Do While Not storyboard.EOF
  17. scenecombo.AddItem storyboard!sceneid 'List all the sceneID items into the ComboBox
  18. storyboard.MoveNext
  19. Loop
  20. ' Close  Recordset
  21. storyboard.close
  22.  
  23. ' Clear the memory
  24. Set storyboard = Nothing
  25.  
  26. End Sub
  27.  
this is my form load coding.
Feb 20 '07 #28
Killer42
8,435 Recognized Expert Expert
hey its working, i didn't set recordset to execute. thaty its given that error. but y my record count is showing -1
I'm not sure of the exact circumstances, but sometimes you have to MoveLast before the RecordCount is properly calculated. The -1 is probably just intended as a True flag to indicate that records were found. If you do a MoveLast then MoveFirst, you'll probably get the correct count.
Feb 20 '07 #29
hariharanmca
1,977 Top Contributor
Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.  
  3. Set CON = New ADODB.Connection
  4. CON.CursorLocation = adUseClient
  5.  
  6. myconnection
  7.  
  8. Call tblLOAD
  9. projecttxt.Text = storyboard!project
  10. 'episode.Text = storyboard!episode
  11.  
  12. storyboard.MoveFirst
  13.  
  14. Call sceneLOAD
  15.  
  16. Do While Not storyboard.EOF
  17. scenecombo.AddItem storyboard!sceneid 'List all the sceneID items into the ComboBox
  18. storyboard.MoveNext
  19. Loop
  20. ' Close  Recordset
  21. storyboard.close
  22.  
  23. ' Clear the memory
  24. Set storyboard = Nothing
  25.  
  26. End Sub
  27.  
this is my form load coding.

Give in this way
Before opening the record set, give
Set storyboard = Nothing
storyboard.CursorLocation = adUseClient
storyboard.Open strYourQry, Connection, adOpenDynamic, adLockReadOnly

then you can get record count value
Feb 21 '07 #30
indhu
140 New Member
Give in this way
Before opening the record set, give
Set storyboard = Nothing
storyboard.CursorLocation = adUseClient
storyboard.Open strYourQry, Connection, adOpenDynamic, adLockReadOnly

then you can get record count value

Expand|Select|Wrap|Line Numbers
  1. Set storyboard = Nothing
  2. storyboard.CursorLocation = adUseClient
  3. storyboard.Open "select * from xyz table, Connection, adOpenDynamic, adLockReadOnly
runtime error 91
error in cursor location. object variable or with block not set
Feb 21 '07 #31
hariharanmca
1,977 Top Contributor
Expand|Select|Wrap|Line Numbers
  1. Set storyboard = Nothing
  2. storyboard.CursorLocation = adUseClient
  3. storyboard.Open "select * from xyz table, Connection, adOpenDynamic, adLockReadOnly
runtime error 91
error in cursor location. object variable or with block not set

You have to create ‘NEW’ Instance
Just copy the function where you are using these lines.
Feb 21 '07 #32
indhu
140 New Member
Expand|Select|Wrap|Line Numbers
  1. Set storyboard = Nothing
  2. storyboard.CursorLocation = adUseClient
  3. storyboard.Open "select * from xyz table, Connection, adOpenDynamic, adLockReadOnly
runtime error 91
error in cursor location. object variable or with block not set
hari, if create a new instance of recordset only it showing me correct recordset.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. myconnection
  3.  
  4. Set storyboard = Nothing
  5.  
  6. Set storyboard = New ADODB.Recordset
  7. storyboard.CursorLocation = adUseClient
  8.  
  9. storyboard.Open "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'", CON, adOpenDynamic, adLockReadOnly
  10.  
  11. Call sceneLOAD
  12.  
  13. Do While Not storyboard.EOF
  14. scenecombo.AddItem storyboard!sceneid 'List all the sceneID items into the ComboBox
  15. storyboard.MoveNext
  16. Loop
  17.  
  18. ' Close  Recordset
  19. storyboard.close
  20.  
  21. ' Clear the memory
  22. Set storyboard = Nothing
  23.  
  24. End Sub
Feb 21 '07 #33
hariharanmca
1,977 Top Contributor
hari, if create a new instance of recordset only it showing me correct recordset.


Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2. myconnection
  3.  
  4. Set storyboard = Nothing
  5.  
  6. Set storyboard = New ADODB.Recordset
  7. storyboard.CursorLocation = adUseClient
  8.  
  9. storyboard.Open "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'", CON, adOpenDynamic, adLockReadOnly
  10.  
  11. Call sceneLOAD
  12.  
  13. Do While Not storyboard.EOF
  14. scenecombo.AddItem storyboard!sceneid 'List all the sceneID items into the ComboBox
  15. storyboard.MoveNext
  16. Loop
  17.  
  18. ' Close  Recordset
  19. storyboard.close
  20.  
  21. ' Clear the memory
  22. Set storyboard = Nothing
  23.  
  24. End Sub


Private Sub Form_Load()
myconnection
Dim storyboard as New ADODB.Recordset
Set storyboard = Nothing
storyboard.CursorLocation = adUseClient
storyboard.Open "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'", CON, adOpenDynamic, adLockReadOnly

Call sceneLOAD

Do While Not storyboard.EOF
scenecombo.AddItem storyboard!sceneid 'List all the sceneID items into the ComboBox
storyboard.MoveNext
Loop

' Close Recordset
storyboard.close

' Clear the memory
Set storyboard = Nothing

End Sub

Set storyboard = Nothing ' in not mandatory if you create new instance
Use this Code which i changed
Feb 21 '07 #34
indhu
140 New Member
Private Sub Form_Load()
myconnection
Dim storyboard as New ADODB.Recordset
Set storyboard = Nothing
storyboard.CursorLocation = adUseClient
storyboard.Open "SELECT sequence, scenes, filename, panel, action, dialogue FROM panel WHERE scenes = '" & scenecombo.Text & "'", CON, adOpenDynamic, adLockReadOnly

Call sceneLOAD

Do While Not storyboard.EOF
scenecombo.AddItem storyboard!sceneid 'List all the sceneID items into the ComboBox
storyboard.MoveNext
Loop

' Close Recordset
storyboard.close

' Clear the memory
Set storyboard = Nothing

End Sub

Set storyboard = Nothing ' in not mandatory if you create new instance
Use this Code which i changed
nothing is loaded.
Feb 21 '07 #35
hariharanmca
1,977 Top Contributor
nothing is loaded.
i am not get you ( Explain what is happen)
Feb 21 '07 #36
indhu
140 New Member
i am not get you ( Explain what is happen)
the form is not loaded with no data. even combo box.

i tried by calling a procedure also

Call tblLOAD
projecttxt.Text = storyboard!project ' error as item cannot be found in collection
i ve declared the query in tblload but still it showing error here.
Feb 21 '07 #37
hariharanmca
1,977 Top Contributor
the form is not loaded with no data. even combo box.

i tried by calling a procedure also

Call tblLOAD
projecttxt.Text = storyboard!project ' error as item cannot be found in collection
i ve declared the query in tblload but still it showing error here.

JUST COPY THE CODE

are you sure all the fields that you specified in QRY are thre in Database
Feb 21 '07 #38
indhu
140 New Member
JUST COPY THE CODE

are you sure all the fields that you specified in QRY are thre in Database
yeah am sure. it has all the data.

anyway it calls the sceneload procedure. the data has to come na.
nothing is coming.
Feb 21 '07 #39
hariharanmca
1,977 Top Contributor
yeah am sure. it has all the data.

anyway it calls the sceneload procedure. the data has to come na.
nothing is coming.

i am not asking about data,
asking about field and field names in table
Feb 21 '07 #40
indhu
140 New Member
i am not asking about data,
asking about field and field names in table
same field name.

first let me rectify this. y its going to second record. and if i click nextitem from combo not opening. if i click nextcommand button it moves. so it is happening like this.

Expand|Select|Wrap|Line Numbers
  1. Private Sub scenecombo_Click()
  2.  
  3. myquery = scenecombo.Text
  4.  
  5. Call sceneLOAD
  6.  
  7. If Not storyboard.EOF Then
  8. storyboard.MoveNext
  9.   If storyboard!sceneid = myquery Then
  10. Call rLOAD
  11.    sequcombo.Text = storyboard!sequence
  12.    panel_txt.Text = storyboard!Panel
  13.    action_txt.Text = storyboard!Action
  14.    dialogue_txt.Text = storyboard!dialogue
  15.    Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
  16.    noofpanel.Text = storyboard.RecordCount
  17. End If
  18. End If
  19. End Sub
Feb 21 '07 #41
hariharanmca
1,977 Top Contributor
same field name.

first let me rectify this. y its going to second record. and if i click nextitem from combo not opening. if i click nextcommand button it moves. so it is happening like this.

Expand|Select|Wrap|Line Numbers
  1. Private Sub scenecombo_Click()
  2.  
  3. myquery = scenecombo.Text
  4.  
  5. Call sceneLOAD
  6.  
  7. If Not storyboard.EOF Then
  8. storyboard.MoveNext
  9.   If storyboard!sceneid = myquery Then
  10. Call rLOAD
  11.    sequcombo.Text = storyboard!sequence
  12.    panel_txt.Text = storyboard!Panel
  13.    action_txt.Text = storyboard!Action
  14.    dialogue_txt.Text = storyboard!dialogue
  15.    Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
  16.    noofpanel.Text = storyboard.RecordCount
  17. End If
  18. End If
  19. End Sub

If Not storyboard.EOF Then
storyboard.MoveNext
If storyboard!sceneid = myquery Then
Call rLOAD
sequcombo.Text = storyboard!sequence
panel_txt.Text = storyboard!Panel
action_txt.Text = storyboard!Action
dialogue_txt.Text = storyboard!dialogue
Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
noofpanel.Text = storyboard.RecordCount
End If
End If


why you are giving storyboard.MoveNext at the begining of asigen values
Feb 21 '07 #42
indhu
140 New Member
If Not storyboard.EOF Then
storyboard.MoveNext
If storyboard!sceneid = myquery Then
Call rLOAD
sequcombo.Text = storyboard!sequence
panel_txt.Text = storyboard!Panel
action_txt.Text = storyboard!Action
dialogue_txt.Text = storyboard!dialogue
Image1.Picture = LoadPicture(App.Path & "\images\" & storyboard("filename"))
noofpanel.Text = storyboard.RecordCount
End If
End If


why you are giving storyboard.MoveNext at the begining of asigen values

Actualliy, am telling the recordset to move to next rec. but its starting from 2nd rec. i tried movefirst, it showing only first recordset.
Feb 21 '07 #43
hariharanmca
1,977 Top Contributor
Actualliy, am telling the recordset to move to next rec. but its starting from 2nd rec. i tried movefirst, it showing only first recordset.

Of course, you have to view first record isit...

if you give movenext, then the recordset will move to the next record and then show you the second record
Feb 21 '07 #44
indhu
140 New Member
Of course, you have to view first record isit...

if you give movenext, then the recordset will move to the next record and then show you the second record
if i give movefirst, it shows only first recset. not the consecutive recset.
Feb 21 '07 #45
hariharanmca
1,977 Top Contributor
if i give movefirst, it shows only first recset. not the consecutive recset.
No indhu, i think you are in the wrong way......

just explain your problem and then what you need.
Feb 21 '07 #46
willakawill
1,646 Top Contributor
No indhu, i think you are in the wrong way......

just explain your problem and then what you need.
I warned you :)
Feb 21 '07 #47
Killer42
8,435 Recognized Expert Expert
I warned you :)
My head hurts just trying to follow this thread.

However, allow me to risk one question...

indhu, why can't your "next" button simply do a MoveNext and (if necessary) load values into form controls? A While loop doesn't seem to make much sense in such a situation.

To get much more help here, I think you really need to start over and lay out the problem very clearly, giving precise details of what you have now (or had when the thread started) and what is wrong with it.
Feb 21 '07 #48
indhu
140 New Member
My head hurts just trying to follow this thread.

However, allow me to risk one question...

indhu, why can't your "next" button simply do a MoveNext and (if necessary) load values into form controls? A While loop doesn't seem to make much sense in such a situation.

To get much more help here, I think you really need to start over and lay out the problem very clearly, giving precise details of what you have now (or had when the thread started) and what is wrong with it.
i want to select sceneid from combo. then other field has to populate.
sceneid frm scenetbl
otherfields frm paneltbl. sceneid is fk in paneltbl
thats it. sorry guys.
Feb 22 '07 #49
hariharanmca
1,977 Top Contributor
I warned you :)

Warning doesn’t make any sense, because I think Indhu is very new to VB that’s why she/he can’t explain what his/her problem; let me to follow him/her way to solve the problem.
Feb 22 '07 #50

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Mohammed Mazid | last post by:
Can anyone please help me on how to move to the next and previous question? Here is a snippet of my code: Private Sub cmdNext_Click() End Sub Private Sub cmdPrevious_Click() showrecord
5
by: Marco Lazzeri | last post by:
Hi, I need some examples of INSERT and UPDATE of DATE columns using 'ALLBALLS' and 'INFINITY' values. I could not find examples on the net. I need, also, to move columns in tables (just like the...
4
by: Alienz | last post by:
I have a subform where I have a subform with 20 options to select from. When I set the multiselect property to simple and select multiple options, nothing is stored. I have another table with...
1
by: Phil Endecott | last post by:
Dear Postgresql experts, According to the documentation for MOVE, it returns the number of rows that it has moved over. It seems to me that this is true for MOVE FORWARD n, but not for MOVE...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
2
TMS
by: TMS | last post by:
Schools over!!! Now its time to play. I would like to learn how to make objects move from one location to the next on a canvas widget. For example: from Tkinter import * class square:...
0
by: shrik | last post by:
I have following error : Total giant files in replay configuration file are : File name : /new_file/prob1.rec Given file /new_file/prob1.rec is successfully verified. Splitting for giant file...
10
by: ewankosayo | last post by:
Hi can anyone help me how can i move to the next record? While Reader.Read For Each Row As DataRow In Table.Rows If Reader("UserID") = Row("UserID") Then ...
3
by: jaeden99 | last post by:
I was wandering if nyone has a script to move files older than x days old? i've seen several to delete, but I don't want to delete. I would like to create a backup of the files first verify with...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.