Data Entry page

kmf

New member
Local time
Today, 14:05
Joined
Jul 19, 2007
Messages
6
I have built a database and it is functional but the people who have to enter data are complaining about some of the features. On the Data entry page I am using a form with a subform. The main form has them entering the date line and shift the subform then has the details. The problem is every time a new main record is added the date and shift go blank and there are 9 lines to enter so they have to reenter the date and shift each time. Is there any way around this? Or is there a way to set the default value to the previously entered value? ive tried putting date and shift in its own subform but since the line is connected to the same tbl it gives an error.
-very frustrated
 
Try this in the after update event of the control:

Me.ControlName.DefaultValue = Me.ControlName
 
Do you want to enter the shift and date in the main form and then enter for example each person who works on that shift and theri hours on that date in the subform? If you do you need the subform to be continuous and the main form to be single. Every time you enter a new record in the subform it will be associated with the date and shift of the main assuming that you have the parent child relationship set correctly between the two forms.
 
I actually have that set up and using your example i can enter all the people on that shift and line. To clarify better: I have two tables involved. The first has the fields Date, Shift ,and Line the second has name, ID, job. I have it set up currently like this:

Data Entry
Date____ Shift___ Line ____
__________________________________________

Name ID Job
xxxxxxx xxx xxxxxx
xxxxxx xx xxxxx
xxxx xxx xxxxxx

I want Data and shift to stay constant but be able to change the line and the related details until I am finished with that date and/or shift
 
For the record, I found that this only works for numeric data types:

Me.ControlName.DefaultValue = Me.ControlName

For text or date types, either of these will work:

Me.ControlName.DefaultValue = """" & Me.ControlName & """"
Me.ControlName.DefaultValue = Chr(34) & Me.ControlName & Chr(34)

Thanks to Missinglinq for the info.
 
Paul, Is that to go in the after update control of what? I am not sure what that is supose to do... does it make the default value the previous one?
 
It would go into the after update event of a control where you wanted to carry a value forward to the next new record during data entry.
 
Thank you for your help.... From error messages the "me" in that string is a macro I am guessing. What do I need to make that macro do? Or where can i find the information on it?
 
When I enter this string: Me.ControlName.DefaultValue = Me.ControlName with ControlName=Shift for me, in the after update control i get an error message saying db can't find the macro 'Me." What am I doing wrong?
 
Ive gotten it thank you very much for your help!!
 

Users who are viewing this thread

Back
Top Bottom