Data Entry and Non-Data Entry Form

nemPyong

Registered User.
Local time
Today, 09:36
Joined
Jul 5, 2013
Messages
18
Hnnng I have problem :banghead: please help me :)

So I have 2 forms that'll only do input, fA and fB
fA: A simple form with one autonumber field (Well it has subform but I don't think it affects this)
fB: A simple form with a Split View, where the datasheet part will always show all the data, so that user could see what to be written in every field (so the datasheet is kinda an example. Actually there are ActionTip properties for control, but it has many fields and what user can put in a field is not seomthing sure)
Both has no required field and no primary key, and preferred to be empty when opened.

The problem:
1) When I used non-data entry mode
When first opened, both forms always automatically show the first record data, and changing a field value will change the first record data (it always goes to the first row in table). Actually I found that if you click "Add New Record" button first, it will bring you to a truly new record, not the first record (if it's seen in table, clicking dat button will bring you to the last row). But for a user, I'm sure it ain't something that can be done intuitively, and writing "Please click the Save button before and after you filled the data" ain't something elegant... in my opinion.
2) When I used data entry mode
fA problem: Just open it, and then close it, voila new row, where the only field with value is the autonumber field
fB problem: the datasheet shows no data

So is there a way so that
fA: when opened will be empty (just like data entry mode does) but won't make blank row like I told in #2 problem everytime it's opened
fB: when opened will be empty and datasheet part will always show all the datas

how to solve this? is there a properties useful for this case?
 
For both forms, in the forms On Open event add:
Code:
DoCmd.GoToRecord , , acNewRec
 
what Bill said ;)

on fA, you could add code to the On Open event, to tell it to go to a new record.... or if it's opening by clicking a button on another form, you could tell it to open fA and go to a new record...

for fB, the datasheet you are using as 'sample' data should be unbound - and locked. Again, you could use the forms opening arguments to tell it to go to a new record.
 
Last edited:
Thank you so very much for both of you! :)

For both forms, in the forms On Open event add:
Code:
DoCmd.GoToRecord , , acNewRec

MY. HE. RO.

I feel kinda funny, dat tl;dr problem's solution is this one line :D

what Bill said ;)

on fA, you could add code to the On Open event, to tell it to go to a new record.... or if it's opening by clicking a button on another form, you could tell it to open fA and go to a new record...

for fB, the datasheet you are using as 'sample' data should be unbound - and locked. Again, you could use the forms opening arguments to tell it to go to a new record.

I've done it, and it works very well! :D

It's a Split Form, doesn't unbound the datasheet part means I have to unbound the form? Well but the problem solved, so it's fine :) Thank you very much! :)
 
We all learned this way, glad you solved your problem.
 

Users who are viewing this thread

Back
Top Bottom