1)force new row; 2)scroll by keyboard

  • Thread starter soros5 via AccessMonster.com
  • Start date
S

soros5 via AccessMonster.com

Hi everybody. I'm blocked in my acces learning with two problems:

1)I have a database with data enter by a form which is linked to. Each time I
open the form, in the field are displayed records that I've already inputed.
How can I force a form to start with a new record?

2) In the same form I have a combo box. Each time I want to select an item I
need to go with the mouse on the litle arrow in the right side. Could I join
an event to alow me to scroll the articles with the two arrows(up/down) from
keybord( is about the forth up/down and left/right).

Thanks a lot for any help!
 
D

Dirk Goldgar

soros5 via AccessMonster.com said:
Hi everybody. I'm blocked in my acces learning with two problems:

1)I have a database with data enter by a form which is linked to. Each
time I
open the form, in the field are displayed records that I've already
inputed.
How can I force a form to start with a new record?

Set the form's Data Entry property to Yes. It's on the Data tab of the
form's property sheet in design view.
2) In the same form I have a combo box. Each time I want to select an item
I
need to go with the mouse on the litle arrow in the right side. Could I
join
an event to alow me to scroll the articles with the two arrows(up/down)
from
keybord( is about the forth up/down and left/right).

I'd need to understand better how you want it to behave before I could
advise you. If you want to do this only when the combo box has the focus,
you could use the combo box's KeyDown event to use the arrow keys to set the
value of the combo box to the next or previous entry in its list. Something
like this:

'----- start of example code -----
Private Sub cboMyCombo_KeyDown(KeyCode As Integer, Shift As Integer)

With Me.cboMyCombo

Select Case KeyCode

Case vbKeyDown
If .ListIndex < .ListCount - 1 Then
.Value = .ItemData(.ListIndex + 1)
Else
DoCmd.Beep
End If
KeyCode = 0

Case vbKeyUp
If .ListIndex > 0 Then
.Value = .ItemData(.ListIndex - 1)
Else
DoCmd.Beep
End If
KeyCode = 0

Case Else
' do nothing

End Select

End With

End Sub
'----- end of example code -----
 
C

Chegu Tom

Or if you call your form from vb code

DoCmd.OpenForm stDocName, , , , acFormAdd, , stLinkCriteria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top