473,397 Members | 1,961 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Record navigation and date problems

Hello expert,

Please help me with the following problems. I have spent ages to resolve
them but no luck.

I have two forms.
(1) "Document Reception Input Form" is the main form. The search field
Document ID is unbound combo box. The table is Documents.
(2) "Document Reception Subform" is the sub form in tabular form. The linked
field is DocID. The table is DocumentReception.

After the DocumentID is selected, the subform will be filled with all the
records with the same valeu in DocID.

The user wants the form to capture the new data only. After the operator
has
keyed the data, they should clikc on the "Next" button to enter the next
entry. A "Previous" button will be available for making corrections entered
during the session, but once the operator clicks on "Accept" button no
changes can be made using the form. The date format should be yyyy/mm/dd.

I have built the main form and the subform and change the date format of the
field on the tables themselves. And I have found the following problems:

(1) The data shown on the table view are yyyy/mm/dd format. But the data
shown on the form is still dd/mm/yyyy.

(2) How to suppress a new record until the "Next" button is pressed. I
tried
the "Allow Additons"="No". But I can't add any new record on the subform.

(3) How to know which records are entered during the session and how to
disable the edit feature so that the old records cannot be edited?

(4) I got the error: 2105 It can't go to a specific record on the following
codes:

Public Sub cmdNext_Click()

On Error GoTo Err_Routine

' DoCmd.GoToRecord , , acNewRec
Me.SetFocus
DoCmd.GoToRecord , , acNext

Exit_Routine:
Exit Sub

Err_Routine:
MsgBox "Unable to create a new record. " & vbCr & " Error: " & Err.Number
& " " & Err.Description, vbOKOnly, "Error"
Resume Exit_Routine
End Sub

Private Sub cmdPrevious_Click()
Me.SetFocus
DoCmd.GoToRecord , , acPrevious
Exit_Routine:
Exit Sub

Err_Routine:
MsgBox "Unable to go to the previous record. " & vbCr & " Error: " & Err.
Number & " " & Err.Description, vbOKOnly, "Error"
Resume Exit_Routine
End Sub

Private Sub cmdUndo_Click()
Me.SetFocus
DoCmd.RunCommand acCmdUndo
Exit_Routine:
Exit Sub

Err_Routine:
MsgBox "Unable to redo the change. " & vbCr & " Error: " & Err.Number & "
" & Err.Description, vbOKOnly, "Error"
Resume Exit_Routine
End Sub
Sep 7 '06 #1
1 1909
I'm not an expert however this is my view of possible a method for one of
the problems,
Can you have a form for entering data that populates a temp table?
Have an accept button that is tied to an append query that appends the new
records into the main table.

"Wes Brooks" <we********@yahoo.comwrote in message
news:5%MLg.512637$Mn5.255477@pd7tw3no...
Hello expert,

Please help me with the following problems. I have spent ages to resolve
them but no luck.

I have two forms.
(1) "Document Reception Input Form" is the main form. The search field
Document ID is unbound combo box. The table is Documents.
(2) "Document Reception Subform" is the sub form in tabular form. The
linked
field is DocID. The table is DocumentReception.

After the DocumentID is selected, the subform will be filled with all the
records with the same valeu in DocID.

The user wants the form to capture the new data only. After the operator
has
keyed the data, they should clikc on the "Next" button to enter the next
entry. A "Previous" button will be available for making corrections
entered
during the session, but once the operator clicks on "Accept" button no
changes can be made using the form. The date format should be yyyy/mm/dd.

I have built the main form and the subform and change the date format of
the
field on the tables themselves. And I have found the following problems:

(1) The data shown on the table view are yyyy/mm/dd format. But the data
shown on the form is still dd/mm/yyyy.

(2) How to suppress a new record until the "Next" button is pressed. I
tried
the "Allow Additons"="No". But I can't add any new record on the subform.

(3) How to know which records are entered during the session and how to
disable the edit feature so that the old records cannot be edited?

(4) I got the error: 2105 It can't go to a specific record on the
following
codes:

Public Sub cmdNext_Click()

On Error GoTo Err_Routine

' DoCmd.GoToRecord , , acNewRec
Me.SetFocus
DoCmd.GoToRecord , , acNext

Exit_Routine:
Exit Sub

Err_Routine:
MsgBox "Unable to create a new record. " & vbCr & " Error: " &
Err.Number
& " " & Err.Description, vbOKOnly, "Error"
Resume Exit_Routine
End Sub

Private Sub cmdPrevious_Click()
Me.SetFocus
DoCmd.GoToRecord , , acPrevious
Exit_Routine:
Exit Sub

Err_Routine:
MsgBox "Unable to go to the previous record. " & vbCr & " Error: " &
Err.
Number & " " & Err.Description, vbOKOnly, "Error"
Resume Exit_Routine
End Sub

Private Sub cmdUndo_Click()
Me.SetFocus
DoCmd.RunCommand acCmdUndo
Exit_Routine:
Exit Sub

Err_Routine:
MsgBox "Unable to redo the change. " & vbCr & " Error: " & Err.Number &
"
" & Err.Description, vbOKOnly, "Error"
Resume Exit_Routine
End Sub


Sep 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Danny J. Lesandrini | last post by:
The following code works with a standard MDB to navigate to a particluar record (with a DAO recordset, of course) but it's giving me problems in an ADP I'm working on. Dim rs As ADODB.Recordset...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
9
by: Karl Roes | last post by:
Hi All, I would like some advice on Next / Previous record buttons. I have a main form for the client, and a continuous subform listing client transactions. If I open one of these transactions...
17
by: perryche | last post by:
I have 5records, e.g. Rc1, Rc2, Rc3..., when user open up a form, I want it to open to a particular record (say Rc3) then when user chooses the Record Selector , it will go to Rc2 and , it will go...
1
by: Brian | last post by:
Hey all - I have a windows form (using VB) in which I display basic information about a person, all of which is housed (for now) in a single Access table, which I'll call "tblPerson". I would...
0
by: Andy_Khosravi | last post by:
I'm having a problem trying to optimize the performance of one of my A97 databases. I have very slow record navigation after a change I made to the table structure, and I'm not sure how best to...
1
by: foothills bhc | last post by:
I have a problem with verifying content of controls on a form before closing the form or moving to the next form "record" (i.e., when moving to the next row of my form's record source). HERE'S THE...
4
by: Jamey Shuemaker | last post by:
Howdy, Saw a couple threads from the past few years on this topic, but didn't really find any solutions. Here's one I found:...
0
by: emalcolm_FLA | last post by:
Hello and TIA for your consideration. I have created several db's for a non-profit and they want custom navigation buttons to display "You are on the first record, last record, etc". With this...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.