|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#16
|
|||
|
|||
|
Quote:
If all you want is a form that opens to add new records only, then go to the property setting form the form. In the line where it says, "data entry", change that to "yes". This will set you form to data entry only. Also, we "over-analysis" because we don't have your database in front of us and it is very hard trying to help without knowing exactly what you are doing and how your db is set up. It is like pinning a tail on a donkey while blind folded. There are many ways of doing what you are trying to do, and your responses really throw us off Last edited by Toyman : May 16th, 2008 at 09:17 AM. |
|
#17
|
|||
|
|||
|
Quote:
Thanx |
|
#18
|
|||
|
|||
|
Yet again i have a new problem. I have just created an option group for my add student form and when i try to set the values it says it is invalid. The data type is set to text so im not sure why it is limiting me to numbers. Any ideas?
|
|
#19
|
|||
|
|||
|
Quote:
Option group only assigns numeric values. You could then use this value to convert the numeric values to text using code. |
|
#20
|
|||
|
|||
|
Quote:
Thanks for the quick reply, how do i do that? |
|
#21
|
|||
|
|||
|
Quote:
You could unbound the option group and put this code in the after update event for the option group: Select Case YourOpGrpName Case 1 Me.YourDestinationField = "YourDesiredReturn1" Case 2 Me.YourDestinationField = "YourDesiredReturn2" End Select See Access help topic for "Case" for further info. The number after the word "case" is the return value for your option group. |
|
#22
|
|||
|
|||
|
Works a treat thanks a lot, will probably have some other problem soon haha
|
|
#23
|
|||
|
|||
|
Who would of thought it would of been so soon......
2 Problems really. 1 - I have a data entry form and have a combo box. When i select an option in the box it is not displaying in the table after i add the record. Any ideas? 2nd - I have 2 fields which are being used for ID purposes which i do not want to be able to change after they have been inputted into the database nor do i want them to be rplicated i.e. a user entering the same ID twice. How can i do this? Before you answer i just want to say i really appreciate all this and this forum is really helpful and quick to reply. Thanks again guys, you have no idea how much you are helping me. |
|
#24
|
|||
|
|||
|
Quote:
Answer 1 I am not sure what you mean by not displaying in the table after you add the record. How are you displaying the record from the table. Are you displaying the record in another form. If you are, then in the after update event of the combo box, send a code to refresh the form in which the record is being displayed. If this is not the answer you are looking for, give more detail as to what you are trying to do. Answer 2 To prevent duplicate records in a field, set the property for the field in the table to not allow duplicates. To prevent a user from changing the content in a field, it really depends on how the id is inputed or displayed. Most record id I use is auto generated with an auto numbering field. As such, I don't even display the id in my form. If you must display the id, then you might use a code to lock the field (Me.YourField.Locked=true) |
|
#25
|
|||
|
|||
|
Quote:
1 - After i add the record i go into the table its supposed to be in and it just has a blank field. Its just a form to add details into a table. Here is how it sort of works: I am using a combo box to pull a detail from a field in a different table to add into this one. I select the detail on the drop down menu and add the record but it is not showing up in the table im adding it to. Hope this helps more 2- Where do i find the property for that field? Ifs its in table design view i cant see anything to do with duplication. Do you perhaps have msn or something so i can explain better? |
|
#26
|
|||
|
|||
|
Quote:
Answer1 I am assuming the combo box is bound to the field in the table. When you input data into a field, Access does not update the table until after you have navagate away from the field. This can be done by tabbing to another field or closing the form. You could also add a code to the after update event for the combo to refresh the form (Me.Refresh). I believe this will cause the data to update to the table. Answer 2 In design view of the table, look for the row that states, "indexed". Choose, "Yes (No Duplicates)" |
|
#27
|
|||
|
|||
|
Quote:
Answer 1 - Solved Answer 2 - Solved ![]() ![]() Cheers once again, cya in 10 mins haha |
|
#28
|
|||
|
|||
|
For the duplicate data function when i create the record using duplicate data access gives me an error message, how do i create my own error message so that if a user enters duplicate data an error comes up asking to change the ID?
|
|
#29
|
|||
|
|||
|
For the duplicate data function when i create the record using duplicate data access gives me an error message, how do i create my own error message so that if a user enters duplicate data an error comes up asking to change the ID?
-------------------------------------------- Just to add something else to my post. Its hard to explain this problem but here goes I have a table called lesson details and it has Lesson_Cost and Lesson_Type I book lessons into a table called Lessons When i selct the type of lesson in the combo box i want the lesson cost field for the Lessons table to put in the cost of the lesson. I have a screenshot here to illustrate what i mean. http://i68.photobucket.com/albums/i4/Studders1/help.jpg Cheers |
|
#30
|
|||
|
|||
|
Quote:
You should really start a new thread for each of your new questions as others might not know this is a new question. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Data Type |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|