Newbie needs help

that triggered another error

hi wayne,

Sorry this has turn into a nightmare. I'm really trying to follow your directions carefully.

When I enter the code for the OnCurrent event I cannot open or close the form with getting run-time error 3314

"The field CD36PhaseTwoVoterFile.voter_id cannot contain a Null value because the Required property for this field is set to true. Enter a value in this field."

When I enter a valid value, I get the same error message and the debug highlights a problem with the AfterUpdate Event Requery.

So this all takes me back to square one on storing default values in those fields...and the second question I asked yesterday.

" I have another question about the txtSearch control.

After I finish editing the current record, how do I clear that record from my form and go to the txtSearch control to scan in a new id number?"

Any solution you can offer will be appreciated. I am really getting desperate. I know you're trying but I need a solution today.

Larry
 
real progress!

hi wayne,

I got everyting working! Thanks so much for your help.

One glitch however.

When the form opens, it somehow populates the voter_id field with a bogus but unique value not stored in the table.

After entering a valid voter-id number in the txtSearch field, editing, and saving that record I discover a new record in my table based on the bogus value.

Any clue where it's getting that bogus value from?

Thanks again for your assistance.

Larry
 
Larry,

I've had a long weekend here.

If the search works OK, is it possible that you have the form's DataEntry
property set to "YES'? In that case, anything that you do would result in
a new record.

Wayne
 
thanks for responding

Hello Wayne,

Those of us who rely on your help appreciate your long weekend's effort.

If the search works OK, is it possible that you have the form's DataEntry
property set to "YES'? In that case, anything that you do would result in
a new record.


I had the DataEntry Property set to yes. But I think the AllowAdditions Property solves my problem not the DataEntry Property.

HOWEVER, when I set the AllowAdditions Property to "NO" every object in the form's Detail section disappears in Form View. When I set the AllowAdditions Property to YES, the Detail section appears just fine but allows users to enter new records.

Any idea how I might correct this?

Regards,

Larry
 
Larry,

DataEntry = Yes (Only allow user to add new records) (You should = No)
AllowAdditions = Yes (Allow user to add a new record)(You should = No)

DataEntry = Yes, won't display your existing records. You definitely
don't want that.

AllowAdditions doesn't affect what you display, it just lets new
records be added. Shouldn't affect what's displayed.

I don't know what to think about the "new" garbled number. That sounds
like an AutoNumber field, and I don't recall you having any of those.

Wayne
 
display problem

Hello Wayne,

Please address the following before moving on to the display problem.

As soon as I scan in a voter id number, I want to immediately return to that field and scan in another voter-id number (or use the mouse or keyboard to navigate to another field to edit it).

I attached a macro to the OnExit event on the txtSearch control to return to it, but I don't know how to set it up to clear the previous record and accept input for the next voter_id number.





I confused you with my poor explanation of the display problem. Sorry.

AllowAdditions doesn't affect what you display, it just lets new
records be added. Shouldn't affect what's displayed.


When I set AllowAdditions to "No" only the Header Information appears in Form View. Controls, labels, records all disappear from the detail section of the form. When I set AllowAdditions to yes, everything appears just fine...

but Access repeatedly throws new records into the table, all with the same bogus "voter_id." And you're right. No AutoNumber field in the table.

How can I set AllowAdditions to "No" and still see the detail section objects?

Thanks for sticking with me on this.

Larry
 
Last edited:
Larry,

Just tinkered with it a bit. Had to remove the Precincts table, as the tables
don't join properly due to missing records.

Wayne
 

Attachments

problem with zip file

Hello Wayne,

The computer I'm using won't let me unzip this file. I get an error message that it's corrupt. Could you send it again.

I know about the problem with the msiing records. Deleting the precincts table is fine.

Does the file yo sent address my need to return to the txtSearch file immediately?

Larry
 
Larry,

I'm at work, the file is at home, I'll post it later today.

Wayne
 
thanks for letting me know

Hi Wayne,

I opened the file on another computer but I don't know which issue you intended it to adddress.

Does it show an example of how to return to the txtSearch field immediately after scannind in a voter_id value?

Take care,

Larry
 
sorry for the silence

i just got caught up on sleep after the election. tomorrow i'll check out the last solution you sent.

thanks very much for your help.

larry
 
sorry for the silence again

Please ignore this inquiry (except for the expression of thanks). I found out how to control what displays when a database opens.


Hi Wayne,

The voter.mdb application you created works perfectly. Thanks very much.

When I open the database, the voter file maintenance form always opens too. How do I defeat that so it just opens to the main database window?

Thanks for helping me once again.

Larry
 
Last edited:
I may need a cascading combo box after all

hi wayne,

I may need to use a cascading combo box. I read my two Access manuals and examined this web site but didn't find anything I could understand. I even downloaded an example you provided another user. No luck.

But, I could probably meet my need with a command button on my form which runs a query that populates the fields on the form rather than simply displaying the results of the query.

Any way to do this? Thanks very much for your help.

Larry
 
Larry,

do you want to use barcodes to find your criteria? eg a voter comes in and shows a Voter ID card, you scan it and there it is. Is this how you want it?

Politics sucks.
 

Users who are viewing this thread

Back
Top Bottom