Question dans access

Marc Rigaux 20 Reputation points
2026-01-04T16:56:34.9466667+00:00

Dans un formulaire access je veux introduire un nombre dans un champ non lié

Microsoft 365 and Office | Access | Development
{count} votes

Answer accepted by question author
  1. Q&A Assist
    2026-01-04T16:56:43.1666667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To introduce a number in an unbound control on an Access form, you can simply set the control's properties to allow for numeric input. Unbound controls are not linked to any field in a table, which means you can use them to display or collect data without affecting the underlying data structure.

    You can use VBA to handle the input and perform operations with the number entered in the unbound control. For example, if you have a text box control on your form, you can reference its value in your code to perform calculations or other actions based on that input.

    Here's a simple example of how you might handle input from an unbound text box named txtNumber:

    Dim userInput As Double
    userInput = Me.txtNumber.Value
    ' Now you can use userInput for calculations or other logic
    

    Make sure to validate the input to ensure it is a number before using it in calculations to avoid runtime errors.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.