alpertunga65
Registered User.
- Local time
- Today, 17:09
- Joined
- Mar 15, 2013
- Messages
- 21
Hello everybody,
I am trying to build a database to assign specific frequencies to radionets.
And I am able to assing one frequency to one radionet by clicking a button each time. I have solved this problem.
But the second step for me is; assinging frequencies to all radionets at once. SO, I will try to explain what I want to do below;
For frequency assignment;
I have two forms named as "TLSCVR_OTOFREATA" and "OtomatikFrekansAtama"
"TLSCVR_OTOFREATA" is a main form which has radionet subform named TLSCVR_AltformOTO
TLSCVR_AltformOTO has fields OTOCVRID, TEMASFRE, ESASFRE AND YEDEKFRE. OTOCVRID field refers autonumber of radionet. Others are frequency fields.
"OtomatikFrekansAtama" is another form on which I am assigning frequencies. This form based on the frequency list.
When I open "TLSCVR_OTOFREATA" form, it shows all radionets in the subform “TLSCVR_AltformOTO“.
First I am selecting a frequency block (A, B, C etc.) in a combobox then clicking a buton, opening "OtomatikFrekansAtama" form with the selected block name as A, B, or C.
Clicking the buton “Command20;
1. It should select the first radionet, Then;
it will assing “TEMAS” then “ESAS” and “YEDEK” frequencies fort the first radionet. (3 frequencies for each radionet.) (“TEMAS”, “ESAS” and “YEDEK” field are taking values from FREKANSs field as you will see from the Picture of "OtomatikFrekansAtama")
2. Then it should turn to the second radionet and do the same procedures as the first one.
3. This procedure should continue until the last radionet.
4. The problems are here;
a. radionet number maybe more than frequency number (i.e. 150 radionets and 100 frequencies). Then loop must turn to the first frequency again. So I mean it must continue until the last radionet.
b. For the loopI do not want to write a specific number fort he last number of radionet. As 100 or other. I want the loop to identfy the last radio net number during the loop. So in code I wrote it as “For OTOCVRSAY = 1 To DLast(OTOCVRSAY) Step 1”
for a buton (Command20). But it is not working...
Here is my code for the button (Command20) which is not workingJ));
Private Sub Command20_Click()
Dim TEMAS, ESAS, YEDEK, ILKF, SONF, FREDEGER As Double
Dim OTOCVRSAY As Integer
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![TEMASFRE] = TEMAS
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![ESASFRE] = ESAS
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![YEDEKFRE] = YEDEK
BLOKALTFRE = ILKF
BLOKUSTFRE = SONF
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![CVRID] = OTOCVRSAY
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![VERICIYERI] = YER
BLOKAD = BLOKAD.Value
For OTOCVRSAY = 1 To DLast(OTOCVRSAY) Step 1
FREKANSs.Value = FREDEGER
For FREDEGER = BLOKALTFRE.Value To BLOKUSTFRE.Value
TEMAS = FREDEGER
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![FREKODT] = FREKODURET(Len(j - 1))
Next FREDEGER
ESAS = FREDEGER
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![ESASFREKOD] = FREKODURET(Len(j - 1))
Next FREDEGER
YEDEK = FREDEGER
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![YEDEKFREKOD] = FREKODURET(Len(j - 1))
Next FREDEGER
Next OTOFRESAY
End Sub
I need HELPPPPP!!!!
I am adding pictures of as "TLSCVR_OTOFREATA" and "OtomatikFrekansAtama"
Thanks
I am trying to build a database to assign specific frequencies to radionets.
And I am able to assing one frequency to one radionet by clicking a button each time. I have solved this problem.
But the second step for me is; assinging frequencies to all radionets at once. SO, I will try to explain what I want to do below;
For frequency assignment;
I have two forms named as "TLSCVR_OTOFREATA" and "OtomatikFrekansAtama"
"TLSCVR_OTOFREATA" is a main form which has radionet subform named TLSCVR_AltformOTO
TLSCVR_AltformOTO has fields OTOCVRID, TEMASFRE, ESASFRE AND YEDEKFRE. OTOCVRID field refers autonumber of radionet. Others are frequency fields.
"OtomatikFrekansAtama" is another form on which I am assigning frequencies. This form based on the frequency list.
When I open "TLSCVR_OTOFREATA" form, it shows all radionets in the subform “TLSCVR_AltformOTO“.
First I am selecting a frequency block (A, B, C etc.) in a combobox then clicking a buton, opening "OtomatikFrekansAtama" form with the selected block name as A, B, or C.
Clicking the buton “Command20;
1. It should select the first radionet, Then;
it will assing “TEMAS” then “ESAS” and “YEDEK” frequencies fort the first radionet. (3 frequencies for each radionet.) (“TEMAS”, “ESAS” and “YEDEK” field are taking values from FREKANSs field as you will see from the Picture of "OtomatikFrekansAtama")
2. Then it should turn to the second radionet and do the same procedures as the first one.
3. This procedure should continue until the last radionet.
4. The problems are here;
a. radionet number maybe more than frequency number (i.e. 150 radionets and 100 frequencies). Then loop must turn to the first frequency again. So I mean it must continue until the last radionet.
b. For the loopI do not want to write a specific number fort he last number of radionet. As 100 or other. I want the loop to identfy the last radio net number during the loop. So in code I wrote it as “For OTOCVRSAY = 1 To DLast(OTOCVRSAY) Step 1”
for a buton (Command20). But it is not working...
Here is my code for the button (Command20) which is not workingJ));
Private Sub Command20_Click()
Dim TEMAS, ESAS, YEDEK, ILKF, SONF, FREDEGER As Double
Dim OTOCVRSAY As Integer
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![TEMASFRE] = TEMAS
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![ESASFRE] = ESAS
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![YEDEKFRE] = YEDEK
BLOKALTFRE = ILKF
BLOKUSTFRE = SONF
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![CVRID] = OTOCVRSAY
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![VERICIYERI] = YER
BLOKAD = BLOKAD.Value
For OTOCVRSAY = 1 To DLast(OTOCVRSAY) Step 1
FREKANSs.Value = FREDEGER
For FREDEGER = BLOKALTFRE.Value To BLOKUSTFRE.Value
TEMAS = FREDEGER
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![FREKODT] = FREKODURET(Len(j - 1))
Next FREDEGER
ESAS = FREDEGER
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![ESASFREKOD] = FREKODURET(Len(j - 1))
Next FREDEGER
YEDEK = FREDEGER
Forms![TLSCVR_OTOFREATA]![TLSCVR_AltformOTO].[Form]![YEDEKFREKOD] = FREKODURET(Len(j - 1))
Next FREDEGER
Next OTOFRESAY
End Sub
I need HELPPPPP!!!!
I am adding pictures of as "TLSCVR_OTOFREATA" and "OtomatikFrekansAtama"
Thanks