PC Review


Reply
Thread Tools Rate Thread

Certain record can not be seen

 
 
Frank Situmorang
Guest
Posts: n/a
 
      8th Jan 2008
Hello,

I have a problem, the user reported to me that he can not enter the invoice
number, because it is duplicate, our inv. number is primary key.

However if we checked it, we can not see the record in the database even
when we let computer find it, there is no that invoice number, however if we
input with that number, the system rejexct.

Can anyone help me how to find out that record?, is that being hidden by
the system?

Thanks in advance


--
H. Frank Situmorang
 
Reply With Quote
 
 
 
 
John W. Vinson
Guest
Posts: n/a
 
      8th Jan 2008
On Mon, 7 Jan 2008 21:02:00 -0800, Frank Situmorang <(E-Mail Removed)>
wrote:

>Hello,
>
>I have a problem, the user reported to me that he can not enter the invoice
>number, because it is duplicate, our inv. number is primary key.
>
>However if we checked it, we can not see the record in the database even
>when we let computer find it, there is no that invoice number, however if we
>input with that number, the system rejexct.
>
>Can anyone help me how to find out that record?, is that being hidden by
>the system?
>
>Thanks in advance


It's possible that you have a corrupt index: there might have been a record
with that value, it was deleted, but was left set in the index.

Get everyone out of your database first. Then MAKE A BACKUP of your database -
the backend if it's split. Open the backend and choose Tools... Database
Utilities... Compact and Repair. If that doesn't help, open the table in
design view; remove the primary key attribute of the field; compact the
database; and restore this field to being the primary key.

John W. Vinson [MVP]
 
Reply With Quote
 
Frank Situmorang
Guest
Posts: n/a
 
      8th Jan 2008
That's not the reason in fact John. The reason is as follows:

I am the one who designed the form, and the form is based on a query which
consists of 3 table:

1. Supplier Invoices
2.Supplier
3.Project

The user did not complete the form with the job number and when he saved it,
and opened it again he could not see the record because the link is inner
link. When I opened the table in fact there is the record which was not shown
because there must be 3 table involved in the query while there were only 2

My question is how can we make it that job field in the form is a
requirement( compulsory) meaning that user can not save it unles they filled
the job number and supplier number, or we just make the table realtionship is
one to many but with outer joins

Thanks for your idea

--
H. Frank Situmorang


"John W. Vinson" wrote:

> On Mon, 7 Jan 2008 21:02:00 -0800, Frank Situmorang <(E-Mail Removed)>
> wrote:
>
> >Hello,
> >
> >I have a problem, the user reported to me that he can not enter the invoice
> >number, because it is duplicate, our inv. number is primary key.
> >
> >However if we checked it, we can not see the record in the database even
> >when we let computer find it, there is no that invoice number, however if we
> >input with that number, the system rejexct.
> >
> >Can anyone help me how to find out that record?, is that being hidden by
> >the system?
> >
> >Thanks in advance

>
> It's possible that you have a corrupt index: there might have been a record
> with that value, it was deleted, but was left set in the index.
>
> Get everyone out of your database first. Then MAKE A BACKUP of your database -
> the backend if it's split. Open the backend and choose Tools... Database
> Utilities... Compact and Repair. If that doesn't help, open the table in
> design view; remove the primary key attribute of the field; compact the
> database; and restore this field to being the primary key.
>
> John W. Vinson [MVP]
>

 
Reply With Quote
 
John W. Vinson
Guest
Posts: n/a
 
      8th Jan 2008
On Tue, 8 Jan 2008 01:13:01 -0800, Frank Situmorang <(E-Mail Removed)>
wrote:

>That's not the reason in fact John. The reason is as follows:
>
>I am the one who designed the form, and the form is based on a query which
>consists of 3 table:
>
>1. Supplier Invoices
>2.Supplier
>3.Project


Well... don't DO that then.

Instead, use a Combo Box for the supplier, and a Combo Box for the project.
Base the Form on the Supplier Invoices table directly, not on a query. The
combo can display the supplier name while storing the unique supplier ID; if
you want to see other information about the supplier (address, for example) on
screen, include those fields in the combo's RowSource query and put textboxes
on the form with control sources like

=comboboxname.Column(n)

where n is the zero based index of the field you want to see.

>The user did not complete the form with the job number and when he saved it,
>and opened it again he could not see the record because the link is inner
>link. When I opened the table in fact there is the record which was not shown
>because there must be 3 table involved in the query while there were only 2


You could change the INNER JOIN terms in the query to LEFT JOIN... but the
combo idea may well be preferable.

>My question is how can we make it that job field in the form is a
>requirement( compulsory) meaning that user can not save it unles they filled
>the job number and supplier number, or we just make the table realtionship is
>one to many but with outer joins


To make any field required, you can either make it a required field in the
table design, or use VBA code in the form's BeforeUpdate event to check.
Making the field required is good insurance but the error message may be
confusing to users. Form BeforeUpdate code might look like

Private Sub Form_BeforeUpdate(Cancel as Integer)
Dim iAns As Integer
If Me!Supplier & "" = "" Then ' check to see if supplier is blank
iAns = MsgBox("Supplier must be specified; click OK to enter supplier," _
& " Cancel to erase form and start over:", vbOKCancel)
Cancel = True ' cancel the update
If iAns = vbCancel Then
Me.Undo ' erase the form if the user selected Cancel
End If
End If

<similar code for Project>

John W. Vinson [MVP]
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select Record in query, save as New Record then edit New Record spreadsheetlady Microsoft Access 1 26th Jan 2010 09:41 PM
adding a new record at subform should update an existing record (not create new record) Mark Kubicki Microsoft Access Form Coding 1 16th Jan 2009 08:34 AM
Find Record action to display a record that is the current record on another for Tom K via AccessMonster.com Microsoft Access Macros 0 31st Oct 2005 07:45 PM
Current Record Count, Previous Record #, Add New Record =?Utf-8?B?Um9iZXJ0IE51c3ogQCBEUFM=?= Microsoft Access Forms 0 15th Feb 2005 08:35 PM
I am trying to get a form to pick up the record data from a different record to this new record Thomas Simsion Microsoft Access Forms 4 10th Nov 2003 09:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 PM.