getting forms working correctly

jalldridge

Registered User.
Local time
Today, 05:17
Joined
May 3, 2005
Messages
60
Hi guys,

I'm trying to create a simlpe database that is use to store time worked for clients (see attached).

If you run the form frmClientEntry i have two issues.

1 - you will see that the title is automatically selected from the combo box. However is i try and enter the form I'm told 'You cannot add or change a record because a related record is required in table 'tblTitle'. If I select one of the entries I get rid of this. I would like the default to be selected...

2 - There is no entry in the hourly rate column field even though there is an entry in the table. How do I get my hourly rate to show? Ideally this will only be a single text box and not a comboBox as the hourly rate will be the same for every client.

If this is a table design issue please let me know and I'll post there.

Thanks
 

Attachments

1. In combobox property in Bound Column you must enter 1, this number cant be 0

2. In tblHourlyRate you didn't enter any value, table is showing only default value. You must enter some value to table add "hourlyRateID" number.

hope this help.
 
Here is your sample back, it is now working.

I have changed your default from 0 to 1 for the title.

I have removed the combo look ups from the client table and left them in the client form, that way your only store the number in the client table and not the same information in two tables.

I would suggest that you leave the drop down combo for your hourly rate, what if you increase it later on. If you had only one and you changed it then that would reflect on all your old records.

Hope this was some help.
 
Last edited:
Sorry forget your db.
 
Last edited:
Thanks for that.

Is there any way that I can get the title combo box to always have a default value? Having the bound colum set to 1 only gives a blank as default. I tried setting the default value to one of the entires ie Mr but when the form opens there is still a blank there.
 
Thanks John,

Please ignore my previous msg - things got confused due to post timings.

I thought a combo for the hourly rate would be better. Glad you agree.

I have removed the combo look ups from the client table and left them in the client form, that way your only store the number in the client table and the same information in two tables.

So are you implying that it is bad to use the lookup wizard in your tables? I was under the impression for some books that this was the way to go.

I shall look at what you have done to the db to get it to work correctly.

Appreciate your help.

Jas
 
jalldridge

Thanks for that.

Is there any way that I can get the title combo box to always have a default value? Having the bound colum set to 1 only gives a blank as default. I tried setting the default value to one of the entires ie Mr but when the form opens there is still a blank there..

Are you asking me that question or ssoltic?

In the sample I returned to your the default for title is working fine.
 
Hi John

The question was for ssoltic. When I wrote this messgae your reply want on the board.

As your DB sample works OK I can have a look at that to see what you done.

Ta

Jas
 
jalldridge said:
So are you implying that it is bad to use the lookup wizard in your tables?

I'm not going to imply that, I'm going to come right out and make it a statement! Lookups should only be done at the FORM level, not at the table level. This causes more problems then its worth, since the only advantages are a) if you use datasheet mode and b) when you use the wizard to generate forms. Since I don't recommend ever using datasheet mode for user interaction that negates that value. When trying to trouble shoot having table level lookups just confuses things.

For more on this check out this article:
http://www.mvps.org/access/lookupfields.htm
 
I'm going to second Scott's opinion. I know that table level lookups seem like a good idea but the problem is that they are intended for users who basically don't know anything and will not progress to doing anything more sophisticated than simply opening a table datasheet and editing their data there. Once you start using forms and especially queries and code, the "feature" becomes a real handicap.
 
jalldridge,

So are you implying that it is bad to use the lookup wizard in your tables? I was under the impression for some books that this was the way to go.


In my humble option YES, don't use lookups in your tables, use them in forms when you need them. During the few years I have been leaning Access I have read many statements from people who option I respect say why you should not use them, I have not seen 1 compelling argument from the opposing view

Another one that you may be tempted to do is store calculations in tables, short answer is DON'T use queries and forms and let them re-calculate when required.


Good Luck with your project.
 

Users who are viewing this thread

Back
Top Bottom