how to get a oracle sequence value at form

newaccess

Registered User.
Local time
Today, 07:05
Joined
Apr 6, 2011
Messages
27
Hi Friends,

I have a form that used to input data. there are a column as primary key at oracle table and value comes from oracle sequences.

the query works in database. However I got a message as run-time error 3078. the Microsoft access database engine cannot fine the input table or query'DUAL'. make sure it exists and that its name is spelled correctly. Click debug. cursor focus on
Set rs1 = CurrentDb.OpenRecordset(strsql)

Thanks for help. I use access97 in window 7.

newaccess
-------org code
Private Sub Form_Open(Cancel As Integer)
Dim dbExercise As DAO.Database
Dim strid As Long
Dim strsql As String
Dim rs1 As DAO.Recordset
Set dbExercise = CurrentDb

strsql2 = "SELECT req_seq.NEXTVAL AS MaxInv FROM DUAL;"
Set rs1 = CurrentDb.OpenRecordset(strsql)
If rs1.BOF = False And rs1.EOF = False Then
 
Thanks for your URL. It works for me.

new access man
 
Glad you got it working. Perhaps you could tell us what you actually did so others can learn.
 

Users who are viewing this thread

Back
Top Bottom