Link to home
Start Free TrialLog in
Avatar of getwidth28
getwidth28Flag for United States of America

asked on

Inserting data using a form, txtbox will let numbers get entered but not text

I have a form named "frmNewCustomer" for entering in data into the table "tblCustomers".  The form will insert data into the table if I put a integer in the "First Name" field.  If I try letters it returns an error.  See the screen shots please.  The database is also attached.

I have the table setup to be text for the data field.  I can't figure out why and it is driving me bonkers.  Please help! :)

 User generated imageUser generated imageUser generated imageUser generated imageUser generated imageLogging1.accdb
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Your form is not designed properly for what you seem to be wanting to do...

Al always , can you first take a step back and explain what you are trying to do with this form?

You also have no permanent relationships established for the tables, so it is hard to determine how the tables relate to one another...
You have key fields with different datatypes. (they will never be able to be linked...)
Your one relationship does not have Referential Integrity established.
...etc

As I tried to suggest before, you really need the *design* here to verified to be valid for what you are trying to do.
*Before* every worrying about forms comboboxes or lookups......


JeffCoachman
In other words, if the tables are constructed properly and related, you should be able to fill the tables with test data and see that the database basic functionality works.

This is not the case with your current tables...
Avatar of getwidth28

ASKER

Ok cool.

Goal
User will be using his iPad/iPhone/etc to enter data from logging.  He will be going around from tree to tree.  In this sort of fashion.

1. Go to the site
2. Click on New Customer, or select existing customer.
3. Click on New Job (ie: job 100)
4. Click on New Tree (ie: Tree 59)
5. Click on New Log (ie: Log 1000)
6. Enter information for the current log of 1000.
7. Click on New Log (ie Job 100, Tree 59, Log 1001)
8. Enter Log information for Log 1001.
9. Repeat until all logs are recorded for Tree 59.
10. Click on New Tree (ie: Tree 60)
11. Click on New Log (ie: Log  1012)
12. Enter in Log information
13. Repeat log information until Tree 60 is complete.
14. Repeat until all trees are recorded.

Your submitted database from before was great.  I tried learning how it works but it was too far ahead of my current access skills.  So I have been going through tutorials trying to learn how you did the example you show me and so forth.

Do those steps tell you what I am trying to do?
I'm seeing this for the Customer/projects:

tblcustomers
CustID (PK)
CustName
CustAdress
CustPhone
...etc

tblProjects
ProjectID (PK)
CustID (FK)
ProjectDate


...and I am seeing this for the Trees:
tblTrees
TreeID (Pk)
TreeTypeID (FK)
TreeLocation
...etc

tblTreeTypes
TreeTypeID (PK)
TreeTypeName

tblLogs
LogID (PK)
TreeID(FK)
Logsize
...etc

How Projects/Customers are linked to Trees is yet to be determined...

Again, this is just a rough outline, not to be taken as Gospel...
You really need to make sure this design is sound before anything else...

JeffCoachman
I am just reading your post above so allow me to catch up...
Roger

Then reports will be such things as what customers had what trees.  Total log lenghs for the jobs.  There is more data to be entered such as girth, price, and stuff but just trying to get a foundation first I guess.

Also, should the tree type be in a table?  Types such as Ash, Maple, Walnut, etc.  Or should those values just be a non-dynamic drop down menu and inserted into the log database?
Your steps tell me what you want the user to do, but they do not tell me how the tables should be designed and related.

And let's forget Ipads and tablets for now, ...if this needs to be a mobile app, then Access is not the best tool for this, ...unless you are willing to invest in Sharepoint/Office 365

But the DB, (regardless of the platform), needs to have a solid table design first

<Your submitted database from before was great.  I tried learning how it works but it was too far ahead of my current access skills.>
Then why even start creating forms?

hang on while I look up the sample I posted for you...
I am going for something that works but doesn't have to be in great shape, although I would like it to be in great shape.

The database work that I have done MySQL and PHP has worked fine in the past and using the database logic from that skill to just get something that works.

I am happy to get this database started right with your help and is greatly appreciated.

I have a coder friend that was developing an actual Mobile app but just didn't work out right.  Then there are Access apps for mobile devices and we tried it out and he said it would work for him.  So trying to get a basic input a customer and logs to make sure the database still looks like a good fit for him with.

Somehow we will use the Doyle Scale.  I currently do not know how to use it yet, which means I don't know what table/relationship there should be.  (hopefully you can get to it)
https://docs.google.com/spreadsheet/ccc?key=0Ampkrrx1YvJedHE4SmRNdkMycDhtTlQtQ2pDb3ZkMXc&usp=sharing#gid=0

Here is a flow chart that the customer made that I looked backup for you (hopefully you can get to it)
https://docs.google.com/file/d/0B2pkrrx1YvJeYU9YdjdFUTNHVWM/edit?usp=sharing
Actually that flow chart I think tells everything we need to know for the tables.  If you can't see it let me know.

Actually I'll upload it just in case.
I clicked the wrong button.
image.png
ASKER CERTIFIED SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Col  I'm out so will look later  thanks.
Thank you.  

Ok, I made some updates.  Hopefully not destroying anything you setup.  I am learning a great deal through this.  I still don't know how to do a bit of the stuff you are doing, like the cascading thing.  I started and read some of the link you gave me but I need to go back to it.  I really appreciate this help.

Doyle
Ok, I know what to do with this thing now.  There is a chart (the one that I shared earlier:
https://docs.google.com/spreadsheet/ccc?key=0Ampkrrx1YvJedHE4SmRNdkMycDhtTlQtQ2pDb3ZkMXc&usp=sharing#gid=0
that figures up the board feet. Or one can use a formula:
http://sizes.com/units/doyles_rule.htm
board feet = (d-4/4)squared * L

I am wondering if that chart should be put into a database and query'd  somehow or if the formula should be used.  I setup a column in your form views to do the formula.  Or have the formula performed and the answer put into the tree and log database.

Grade
This one might be a toughy.  
User generated image
Here is what the logger needs to do.  
When going through the log, the logger decides how good the log is, which is basically the cost per foot.  In the picture Log 6 was decided that is was a 0.22 grade scale.  the logger needs an input form, combo, etc where the scale is based on tree type/species.  For example.

Sycamore 0.4,0.22
Ash 0.7,0.6,0.5,0.35,0.25
and so on.  Each tree type has its own set of grade scale, the grade scale will change with each species.

Did I explain that ok?

So maybe this?
- Add a column to the tblTrees table called GradeScaleID
- Add a table called TreeTypes or Species and have at least the columns of TreeType (such as maple, sycamore, popular, ash), TreeTypeID, GradeScaleID
- Add a table called GradeScales and have the columns such as TreeTypeID, GradeScaleValue.

So the GradeScale table might be....
User generated image
Any thoughts?
Database168.mdb
How in the world do you set up the tables like you have them?  I am done for the day, I made some more changes and stuff.  If I need to I'll just do the changes again into a new file if so.  I will try and knock out knowing how you set those tables up and to understand why that is important.
oK, so where do we stand with this currently?
I'll close it out with an excellent review and points.  Is there a way for getting the other couple of tables setup like you did with the others?
Not sure what you mean.

Just try to replicate my basic design...

But remember that you should not take my very "basic" design as Gospel.

You really need to talk to the client, because other requirements may cause the design to change.
Ok, thanks a bunch!

I imagine that I will have to post something again sometime.
This person was great to work with and had a great attitude.