Results 1 to 10 of 10

Thread: form help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28

    Question

    I want am trying to do is in my form there will be a integer field numbers to exclusive forms. If someone was to go back into the form and re-edit it I DO NOT want the integer field to have to same number How would I go about writing this?
    '
    Here s my code

    If A.Value="Martha" Then
    TempEntBldValue = EntBld.Value ///integer field
    EntBld.Value = TempEntBldValue
    MsgBox "Invalid Value"
    End if
    End Sub

  2. #2
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Question

    I'd like to help, but you must give more details and use an understandable language!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28
    okay here we go.
    say i put a # in a field and then close it.
    Nxt say I have to reopen the field to fix something, well the field that has the # field in it can not have the same integer that it had before the field ws reopened to be fixed


    If Asgnto.Value="Martha" Then
    TempEntBldValue = EntBld.Value //I put the integer into a temp folder
    EntBld.Value = TempEntBldValue //here's where i want to compare the temp folder and the text field to make sure they don not = each other
    MsgBox "Invalid Value" //here's where i alert the user that they can not have the same value
    End if
    End Sub

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    What's the useof your EntBld.Value?
    I think this will help, but I do not completly understand your problem.
    If A.Value="Martha" Then
    TempEntBldValue = EntBld.Value ///integer field
    I think your EntBld.Value must get any kind of new information in here.???
    if EntBld.Value = TempEntBldValue then
    MsgBox "Invalid Value"
    End if
    End Sub

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28

    Smile

    the EntBld.Value is the name of th field that holds the integer..does that help

  6. #6
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    I think you have to use more specific code between:
    'TempEntBldValue = EntBld.Value'
    and
    'if EntBld.Value = TempEntBldValue then
    MsgBox "Invalid Value"
    End if '

    You store EntBld.Value into the TempEntBldValue, but I don't see where you get a new value for EntBld.Value. In your code both values remain the same, so the If..... will always be True.

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28
    a new integer is entered into the EntBld.Value when the form is reopen to be fixed. Then It should be compared in the temp to make sure they do not =

  8. #8
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    Lt's see if I get it wrigth
    while your in the form you perfom:
    If A.Value="Martha" Then
    TempEntBldValue = EntBld.Value

    after coming back into the form again you want to perform this part:
    if EntBld.Value = TempEntBldValue then
    MsgBox "Invalid Value"
    End if
    End Sub

    1. The value TempEntBldValue must be set as a public Variable (Dim shared.....), in order not to loose the value when leaving the SUB.
    2. Both parts must be in differnet SUB's, the second can be called when reopening the form

    Hope that's it

  9. #9

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28

    Wink

    U got it. Thanx for you help!!

  10. #10
    Banned
    Join Date
    Jul 2000
    Posts
    11

    Rich text box control

    Hi,
    Is there any way, i can include a graphic and text in a rich text box control? When i add text to it, the graphic gets replaced by the text. Or is there any other control that i can use for this purpose. Please help...
    -deep.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width